Loading [MathJax]/extensions/TeX/AMSsymbols.js
Radium Engine
1.5.0
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
Functions
a
c
d
f
g
i
l
n
o
p
q
r
s
t
v
Variables
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
b
d
f
h
i
m
n
s
t
v
w
Typedefs
a
b
c
f
g
i
k
o
r
s
t
u
v
Enumerations
Enumerator
Related Functions
Files
File List
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
StdOptional.hpp
1
#pragma once
2
3
/*
4
* This file provides
5
* - Ra::Core::Utils::optional, which is an alias for std::optional or std::experimental::optional,
6
* - preprocessor symbols:
7
* - have_optional: defined if optional is found in std:: or in std::experimental::
8
* - have_experimental_optional: defined iff optional is found in std::experimental::
9
*
10
* To trigger an error if optional is not found, define RA_REQUIRE_OPTIONAL before including this
11
* file:
12
* \code{.cpp}
13
* #define RA_REQUIRE_OPTIONAL
14
* #include <Core/Utils/StdOptional.hpp> // trigger an error if optional is not found
15
* #undef RA_REQUIRE_OPTIONAL
16
* \endcode
17
*/
18
19
#ifdef __has_include
20
# if __has_include( <optional>)
21
# include <optional>
22
# define have_optional
23
# elif __has_include( <experimental/optional>)
24
# include <experimental/optional>
25
# define have_optional
26
# define have_experimental_optional
27
# else
28
# ifdef RA_REQUIRE_OPTIONAL
29
# error Feature Optionnal is required
30
# endif
31
# endif
32
#endif
33
34
// Create alias
35
#ifdef have_optional
36
namespace
Ra
{
37
namespace
Core {
38
namespace
Utils {
39
# ifdef have_experimental_optional
40
template
<
typename
T>
41
using
optional = std::experimental::optional<T>;
42
# else
43
template
<
typename
T>
44
using
optional = std::optional<T>;
45
# endif
46
}
// namespace Utils
47
}
// namespace Core
48
}
// namespace Ra
49
#endif
50
// end Create alias
Ra
Definition:
Cage.cpp:3
src
Core
Utils
StdOptional.hpp
Generated on Wed Apr 5 2023 15:07:31 for Radium Engine by
1.9.1