ipaddress 1.1.0
|
Manages an optional contained value within a class template. More...
#include "config.hpp"
Go to the source code of this file.
Classes | |
class | optional< T > |
A template class to manage an optional contained value. More... | |
Namespaces | |
namespace | ipaddress |
Namespace dedicated to IP addresses and networks operations. | |
Manages an optional contained value within a class template.
The optional
class template is designed to handle situations where a value may or may not be present. It encapsulates a value in a way that does not require dynamic memory allocation, ensuring that the value, if present, is part of the optional
object's footprint. This makes optional
ideal for use as a return type for functions that may fail to return a value. An optional
object can be contextually converted to bool
, indicating whether a value is contained or not.