2
3
4
5
6
7
8
9
10
11
12
13
15#ifndef IPADDRESS_OPTIONAL_HPP
16#define IPADDRESS_OPTIONAL_HPP
23
24
25
26
27
28
29
30
31
32
33
40
41
45
46
51
52
53
54
62
63
64
65
73
74
75
76
79 _has_value(opt._has_value),
84
85
86
87
90 _value = value_type{};
95
96
97
98
99
107
108
109
110
111
114 _has_value = opt._has_value;
121
122
123
124
125
126
127
133
134
135
136
137
138
139
145
146
147
148
149
150
151
157
158
159
160
161
162
163
169
170
171
172
173
174
180
181
182
183
184
185
191
192
193
194
195
196
197
203
204
205
206
207
208
209
215
216
217
218
219
220
221
223 return std::move(_value);
227
228
229
230
231
232
233
235 return std::move(_value);
A template class to manage an optional contained value.
Definition optional.hpp:35
constexpr inline value_type && value() &&noexcept
Move access to the contained value.
Definition optional.hpp:222
constexpr inline optional & operator=(const optional< T > &opt) noexcept
Assigns the value and the state of existence from another optional object.
Definition optional.hpp:112
constexpr inline const value_type && value() const &&noexcept
Constant move access to the contained value.
Definition optional.hpp:234
constexpr inline optional(value_type &&val) noexcept
Move constructor that constructs an optional object with a contained value, initializing it with val.
Definition optional.hpp:66
constexpr inline value_type & value() &noexcept
Reference access to the contained value.
Definition optional.hpp:198
constexpr inline optional() noexcept(noexcept(T()))=default
Default constructor that constructs an optional object without a contained value.
constexpr inline value_type & operator*() noexcept
Reference access to the contained value.
Definition optional.hpp:152
constexpr inline const value_type & operator*() const noexcept
Constant reference access to the contained value.
Definition optional.hpp:164
constexpr inline optional(std::nullptr_t) noexcept(noexcept(T()))
Constructs an optional object that does not contain a value.
Definition optional.hpp:47
constexpr inline value_type * operator->() noexcept
Pointer access to the contained value.
Definition optional.hpp:128
constexpr inline optional(const optional< T > &opt) noexcept
Copy constructor that constructs an optional object with a contained value, copying it from opt.
Definition optional.hpp:77
constexpr inline optional & operator=(value_type &&val) noexcept
Move assignment operator that sets the contained value of the optional object to val.
Definition optional.hpp:100
constexpr inline const value_type * operator->() const noexcept
Constant pointer access to the contained value.
Definition optional.hpp:140
constexpr inline optional(const value_type &val) noexcept(noexcept(T(val)))
Copy constructor that constructs an optional object with a contained value, initializing it with val.
Definition optional.hpp:55
constexpr inline optional & operator=(std::nullptr_t) noexcept
Assignment operator that clears the contained value of the optional object.
Definition optional.hpp:88
constexpr inline operator bool() const noexcept
Checks existence of the contained value.
Definition optional.hpp:175
constexpr inline const value_type & value() const &noexcept
Constant reference access to the contained value.
Definition optional.hpp:210
constexpr inline bool has_value() const noexcept
Checks existence of the contained value.
Definition optional.hpp:186
#define IPADDRESS_EXPORT
Definition config.hpp:42
#define IPADDRESS_NODISCARD
Definition config.hpp:98
#define IPADDRESS_FORCE_INLINE
Definition config.hpp:112
#define IPADDRESS_NAMESPACE
Definition config.hpp:38
#define IPADDRESS_NOEXCEPT
Definition config.hpp:89