The C++ Programming Language - std::variant (tagged unions, write safer code) | Modern Cpp Series Ep. 84
4.0(5)
38 learners
What you'll learn
This course includes
68.3 hours of video
Certificate of completion
Access on mobile and TV
Summary
Full Transcript
►Full C++ Series Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8j-tlhYVPYgiIyXduu6m-L
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join
►Lesson Description: In this lesson we are going to take a look at 'tagged unions' which are implemented as std::variant in C++17 and beyond. This is a way to create more type-safe unions in C++ by checking the field that you are accessing. Beyond the scenes, we're really creating a 'struct', so we do not however get the compactness of a regular union, thus trading space for safety.
►YouTube Channel: https://www.youtube.com/c/MikeShah
►Please like and subscribe to help the channel!
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.