CVB++ 15.0
stdoptional.hpp
1#pragma once
2
8
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
21namespace Cvb
22{
23 using std::bad_optional_access;
24 using std::make_optional;
25 using std::nullopt_t;
26 using std::optional;
27 inline constexpr std::nullopt_t nullopt = std::nullopt;
28 inline constexpr std::in_place_t in_place = std::in_place;
29} // namespace Cvb
30
31#else
32
33# include "optional.hpp"
34
35namespace Cvb
36{
38 using Shims::make_optional;
39 using Shims::nullopt_t;
40 using Shims::optional;
41 static constexpr Shims::nullopt_t nullopt{};
42 static constexpr Shims::in_place_t in_place{};
43} // namespace Cvb
44
45#endif
Error when accessing not set value.
Definition optional.hpp:33
This class is a replacement for C++17 std::optional.
Definition optional.hpp:61
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
Disambiguation tags that can be passed to the constructors of optional() to indicate that the contain...
Definition utilities.hpp:24
Indicates optional() type with uninitialized state.
Definition optional.hpp:48