std::formatter for Custom Types with std::format (C++20) - C++ Utilities | Modern Cpp Series Ep. 189
HTML-код
- Опубликовано: 11 сен 2024
- ►Full C++ Series Playlist: • The C++ Programming La...
►Find full courses on: courses.mshah.io/
►Join as Member to Support the channel: / @mikeshah
►Lesson Description: In this lesson we take a look at std::format again, but this time for custom types. I will demonstrate how to write a specialization for std::formatter so that you can use std::format to print out your custom types. I'll also show you how to write special cases, so that you can have your own types of special format specifiers for different types of output. As always, feel free to bring up any questions and discuss what you've learned!
►RUclips Channel: / mikeshah
►Please like and subscribe to help the channel!
►Join our free community: courses.mshah....
Always so thankful for your wonderful c++ and gfx lessons! The other languages ones are also intriguing to me but I would like to especially thank you for the modern cpp and cross platform gfx lessons which are the best in the world ❤🙏
Cheers, thank you for the very kind words!
Outstanding
@@JRivero cheers!
A C++20 feature that still hasn't landed in GCC or Clang. It is painful.
Features sometimes moving faster than the compilers, and sometimes we get features before standardization as well 🙂
write
using namespace std ;
before the code and u wont need to write std before any thing like cout and cin
I like to show the full namespace. For these small examples it does not matter, but at scale it's a good habit to have
Hey Kiddo! Do you seriously think you can teach C++ to professor of computer science with decades of industry experience in C++? Go play Minecraft.