stdvariant.hpp
1 #pragma once
2 
9 #include "stdver.hpp"
10 
11 #if CVB_HAS_CPP2017
12 # if defined __has_include && __has_include(<variant>)
13 # define CVB_HAS_STDVARIANT
14 # endif
15 #endif
16 
17 #ifdef CVB_HAS_STDVARIANT
18 
19 #include <variant>
20 
21 namespace Cvb
22 {
23  using std::bad_variant_access;
24  using std::get;
25  using std::get_if;
26  using std::holds_alternative;
27  using std::monostate;
28  using std::variant;
29  using std::variant_alternative;
30  using std::variant_npos;
31  using std::variant_size;
32  using std::visit;
33 }
34 
35 #else
36 
37 #include "../shims/variant.hpp"
38 
39 namespace Cvb
40 {
41  using Shims::bad_variant_access;
42  using Shims::get;
43  using Shims::get_if;
44  using Shims::holds_alternative;
45  using Shims::monostate;
46  using Shims::variant;
47  using Shims::variant_alternative;
48  using Shims::variant_npos;
49  using Shims::variant_size;
50  using Shims::visit;
51 }
52 
53 
54 #endif
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: version.hpp:11