12# if defined __has_include && __has_include(<variant>)
13# define CVB_HAS_STDVARIANT
17#ifdef CVB_HAS_STDVARIANT
23 using std::bad_variant_access;
26 using std::holds_alternative;
29 using std::variant_alternative;
30 using std::variant_npos;
31 using std::variant_size;
37# include "../shims/variant.hpp"
Error when accessing not set alternative.
Definition variant.hpp:26
This class is a replacement for C++17 std::variant.
Definition variant.hpp:49
auto visit(VISITOR &&visitor, VARIANT &&var) -> decltype(visitor(get< 0 >(var)))
Visits the given Shims::variant var. Cvb::Shims::visit can only visit one variant (not multiple like ...
Definition variant.hpp:622
const variant_alternative_t< I, variant< TS... > > & get(const variant< TS... > &var)
Gets the value of the given Shims::variant var as the alternative with index I.
Definition variant.hpp:382
bool holds_alternative(const variant< TS... > &var) noexcept
Gets whether the Shims::variant var holds an instance of type T.
Definition variant.hpp:567
static const constexpr size_t variant_npos
Returned by variant::index() on invalid state.
Definition variant.hpp:33
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
Unit type intended for use as a well-behaved empty alternative in Shims::variant.
Definition variant.hpp:237
Compile-time index access to the type of the alternatives at index I.
Definition variant.hpp:41
Get the number of alternatives in a variant.
Definition variant.hpp:327