How To Use std::visit With Multiple Variants—Bartlomiej Filipek

Save to:
Instapaper Pocket Readability

Variant utility.

How To Use std::visit With Multiple Variants

by Bartlomiej Filipek

From the article:

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...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.