stdoptional.hpp
1 #pragma once
2 
9 #include "stdver.hpp"
10 
11 #if CVB_HAS_CPP2017
12 # if defined __has_include && __has_include(<optional>)
13 # define CVB_HAS_STDOPTIONAL
14 # endif
15 #endif
16 
17 #ifdef CVB_HAS_STDOPTIONAL
18 
19 # include <optional>
20 
21 namespace Cvb
22 {
24 using std::optional;
25 using std::nullopt_t;
26 using std::make_optional;
27 inline constexpr std::nullopt_t nullopt = std::nullopt;
28 inline constexpr std::in_place_t in_place = std::in_place;
29 }
30 
31 #else
32 
33 # include "optional.hpp"
34 
35 namespace Cvb
36 {
37 using Shims::bad_optional_access;
38 using Shims::optional;
39 using Shims::nullopt_t;
40 using Shims::make_optional;
41 static constexpr Shims::nullopt_t nullopt{};
42 static constexpr Shims::in_place_t in_place{};
43 }
44 
45 #endif
Root namespace for the Image Manager interface.
Definition: version.hpp:11