The Battle for Wesnoth  1.19.7+dev
Namespaces | Functions
variant.hpp File Reference

MacOS doesn't support std::visit when targing MacOS < 10.14 (currently we target 10.11). More...

#include <variant>
Include dependency graph for variant.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 utils
 

Functions

template<typename... Types>
std::size_t utils::variant_index (const variant< Types... > &var)
 

Detailed Description

MacOS doesn't support std::visit when targing MacOS < 10.14 (currently we target 10.11).

This provides a wrapper around the STL variant API on all platforms except MacOS, which instead utilizes boost::variant.

Definition in file variant.hpp.