mod_servlet
C++Servlets
 All Classes Files Functions Variables Typedefs Macros Pages
optional.h File Reference

Defines optional container objects and related methods. More...

#include <utility>
#include <type_traits>
#include <servlet/lib/exception.h>

Go to the source code of this file.

Classes

class  servlet::optional_ptr< T >
 Class implements smart pointer with optional ownership. More...
 
class  servlet::optional_ref< T >
 Optional reference implementation. More...
 

Functions

template<typename CharT , typename Traits , typename T >
std::basic_ostream< CharT,
Traits > & 
servlet::operator<< (std::basic_ostream< CharT, Traits > &out, const optional_ptr< T > &opt)
 Stream output operator for optional_ptr object. More...
 
template<typename CharT , typename Traits , typename T >
std::basic_ostream< CharT,
Traits > & 
servlet::operator<< (std::basic_ostream< CharT, Traits > &out, const optional_ref< T > &opt)
 Stream output operator for optional_ref object. More...
 
template<typename T >
constexpr bool servlet::operator== (const optional_ref< T > &l, const optional_ref< T > &r)
 Performs "==" comparison of two optional_ref objects. More...
 
template<typename T >
constexpr bool servlet::operator!= (const optional_ref< T > &l, const optional_ref< T > &r)
 Performs "!=" comparison of two optional_ref objects. More...
 
template<typename T >
constexpr bool servlet::operator< (const optional_ref< T > &l, const optional_ref< T > &r)
 Performs "<" comparison of two optional_ref objects. More...
 
template<typename T >
constexpr bool servlet::operator> (const optional_ref< T > &l, const optional_ref< T > &r)
 Performs ">" comparison of two optional_ref objects. More...
 
template<typename T >
constexpr bool servlet::operator<= (const optional_ref< T > &l, const optional_ref< T > &r)
 Performs "<=" comparison of two optional_ref objects. More...
 
template<typename T >
constexpr bool servlet::operator>= (const optional_ref< T > &l, const optional_ref< T > &r)
 Performs ">=" comparison of two optional_ref objects. More...
 
template<typename T , typename U >
constexpr bool servlet::operator== (const optional_ref< T > &l, const U &r)
 Performs "==" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator== (const T &l, const optional_ref< T > &r)
 Performs "==" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator!= (const optional_ref< T > &l, U const &r)
 Performs "!=" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator!= (const U &l, const optional_ref< T > &r)
 Performs "!=" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator< (const optional_ref< T > &l, const U &r)
 Performs "<" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator< (const U &l, const optional_ref< T > &r)
 Performs "<" comparison of an object and another object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator> (const optional_ref< T > &l, const U &r)
 Performs ">" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator> (const U &l, const optional_ref< T > &r)
 Performs ">" comparison of an object and another object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator<= (const optional_ref< T > &l, const U &r)
 Performs "<=" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator<= (const U &l, const optional_ref< T > &r)
 Performs "<=" comparison of an object and another object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator>= (const optional_ref< T > &l, const U &r)
 Performs ">=" comparison of optional_ref object and other object which can be compared to the object contained in optional_ref. More...
 
template<typename T , typename U >
constexpr bool servlet::operator>= (const U &l, const optional_ref< T > &r)
 Performs ">=" comparison of an object and another object contained in optional_ref. More...
 
template<typename T >
void servlet::swap (optional_ref< T > &l, optional_ref< T > &r) noexcept(noexcept(l.swap(r)))
 Overloads the std::swap algorithm for optional_ref. More...
 

Detailed Description

Defines optional container objects and related methods.