153 : default_(), unspecified_(true) {
161 return (default_.empty());
177 operator<<(std::ostream& os, const Optional<T>& optional_value) {
178 os << optional_value.get();
186 #endif // OPTIONAL_VALUE_H
void unspecified(bool unspecified)
Modifies the flag that indicates whether the value is specified or unspecified.
T ValueType
Type of the encapsulated value.
bool unspecified() const
Checks if the value has been specified or unspecified.
T default_
Encapsulated value.
bool operator!=(const T &other) const
Inequality operator.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Optional()
Default constructor.
bool operator==(const T &other) const
Equality operator.
bool unspecified_
Flag which indicates if the value is specified.
bool empty() const
Checks if the encapsulated value is empty.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Optional< T > & operator=(A other)
Assigns a new value value and marks it "specified".
A generic exception that is thrown if a function is called in a prohibited way.
A template representing an optional value.
Optional(A value, const bool unspecified=false)
Constructor.