Quantcast
Channel: Bartek's coding blog
Viewing all articles
Browse latest Browse all 325

How To Use std::visit With Multiple Variants

$
0
0

How To Use std::visit with multiple variants

std::visit is a powerful utility that allows you to call a function over a currently active type in std::variant. It does some magic to select the proper overload, and what’s more, it can support many variants at once.

Let’s have a look at a few examples of how to use this functionality.

Read more...

Viewing all articles
Browse latest Browse all 325

Trending Articles