Examples of std::variant
Discover how to use std::variant in C++17 to implement type-safe error handling. Understand ways to return errors alongside regular types and improve function outputs without exceptions. This lesson builds on the basics to show practical uses of variant in error management.
We'll cover the following...
We'll cover the following...
Having learned most of the std::variant details, we can now explore a few examples. ...