#include <cassert>
#include <stdexcept>
#include <utility>
Go to the source code of this file.
Namespaces | |
nonstd | |
nonstd::detail | |
nonstd::optional_lite | |
nonstd::optional_lite::detail | |
Typedefs | |
typedef typelist< char, typelist< struct_t< char >, typelist< short, typelist< struct_t< short >, typelist< int, typelist< struct_t< int >, typelist< long, typelist< struct_t< long >, typelist< float, typelist< struct_t< float >, typelist< double, typelist< struct_t< double >, typelist< long double, typelist< struct_t< long double >, typelist< char *, typelist< struct_t< char * >, typelist< short *, typelist< struct_t< short * >, typelist< int *, typelist< struct_t< int * >, typelist< long *, typelist< struct_t< long * >, typelist< float *, typelist< struct_t< float * >, typelist< double *, typelist< struct_t< double * >, typelist< long double *, typelist< struct_t< long double * >, typelist< Unknown(*)(Unknown), typelist< struct_t< Unknown(*)(Unknown) >, typelist< Unknown *Unknown::*, typelist< struct_t< Unknown *Unknown::* >, typelist< Unknown(Unknown::*)(Unknown), typelist< struct_t< Unknown(Unknown::*)(Unknown) >, nulltype > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | nonstd::optional_lite::detail::alignment_types |
Functions | |
template<class T > | |
in_place_t | nonstd::in_place (detail::in_place_type_tag< T >=detail::in_place_type_tag< T >()) |
template<std::size_t I> | |
in_place_t | nonstd::in_place (detail::in_place_index_tag< I >=detail::in_place_index_tag< I >()) |
template<std::size_t I> | |
in_place_t | nonstd::in_place_index (detail::in_place_index_tag< I >=detail::in_place_index_tag< I >()) |
template<class T > | |
in_place_t | nonstd::in_place_type (detail::in_place_type_tag< T >=detail::in_place_type_tag< T >()) |
template<typename T > | |
optional< T > | nonstd::optional_lite::make_optional (T const &value) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator!= (optional< T > const &x, optional< U > const &y) |
template<typename T > | |
bool | nonstd::optional_lite::operator!= (optional< T > const &x, nullopt_t) |
template<typename T > | |
bool | nonstd::optional_lite::operator!= (nullopt_t, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator!= (optional< T > const &x, U const &v) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator!= (U const &v, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator< (optional< T > const &x, optional< U > const &y) |
template<typename T > | |
bool | nonstd::optional_lite::operator< (optional< T > const &, nullopt_t) |
template<typename T > | |
bool | nonstd::optional_lite::operator< (nullopt_t, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator< (optional< T > const &x, U const &v) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator< (U const &v, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator<= (optional< T > const &x, optional< U > const &y) |
template<typename T > | |
bool | nonstd::optional_lite::operator<= (optional< T > const &x, nullopt_t) |
template<typename T > | |
bool | nonstd::optional_lite::operator<= (nullopt_t, optional< T > const &) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator<= (optional< T > const &x, U const &v) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator<= (U const &v, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator== (optional< T > const &x, optional< U > const &y) |
template<typename T > | |
bool | nonstd::optional_lite::operator== (optional< T > const &x, nullopt_t) |
template<typename T > | |
bool | nonstd::optional_lite::operator== (nullopt_t, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator== (optional< T > const &x, U const &v) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator== (U const &v, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator> (optional< T > const &x, optional< U > const &y) |
template<typename T > | |
bool | nonstd::optional_lite::operator> (optional< T > const &x, nullopt_t) |
template<typename T > | |
bool | nonstd::optional_lite::operator> (nullopt_t, optional< T > const &) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator> (optional< T > const &x, U const &v) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator> (U const &v, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator>= (optional< T > const &x, optional< U > const &y) |
template<typename T > | |
bool | nonstd::optional_lite::operator>= (optional< T > const &, nullopt_t) |
template<typename T > | |
bool | nonstd::optional_lite::operator>= (nullopt_t, optional< T > const &x) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator>= (optional< T > const &x, U const &v) |
template<typename T , typename U > | |
bool | nonstd::optional_lite::operator>= (U const &v, optional< T > const &x) |
template<typename T > | |
void | nonstd::optional_lite::swap (optional< T > &x, optional< T > &y) |
Variables | |
const nullopt_t | nonstd::optional_lite::nullopt ((nullopt_t::init())) |
#define nonstd_lite_HAVE_IN_PLACE_TYPES 1 |
Definition at line 311 of file optional.hpp.
#define nonstd_lite_in_place | ( | T | ) | nonstd::in_place_type<T> |
Definition at line 381 of file optional.hpp.
#define nonstd_lite_in_place_index | ( | T | ) | nonstd::in_place_index<I> |
Definition at line 383 of file optional.hpp.
#define nonstd_lite_in_place_index_t | ( | T | ) | nonstd::in_place_t(&)( nonstd::detail::in_place_index_tag<I> ) |
Definition at line 379 of file optional.hpp.
#define nonstd_lite_in_place_t | ( | T | ) | nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag<T> ) |
Definition at line 377 of file optional.hpp.
#define nonstd_lite_in_place_type | ( | T | ) | nonstd::in_place_type<T> |
Definition at line 382 of file optional.hpp.
#define nonstd_lite_in_place_type_t | ( | T | ) | nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag<T> ) |
Definition at line 378 of file optional.hpp.
#define NONSTD_OPTIONAL_LITE_HPP |
Definition at line 12 of file optional.hpp.
#define optional_ALIGN_AS | ( | to_align | ) | typename type_of_size< alignment_types, alignment_of< to_align >::value >::type |
Definition at line 505 of file optional.hpp.
#define optional_ALIGN_TYPE | ( | type | ) | typelist< type , typelist< struct_t< type > |
Definition at line 550 of file optional.hpp.
#define optional_BETWEEN | ( | v, | |
lo, | |||
hi | |||
) | ( lo <= v && v < hi ) |
Definition at line 130 of file optional.hpp.
#define optional_COMPILER_CLANG_VERSION 0 |
Definition at line 149 of file optional.hpp.
#define optional_COMPILER_GNUC_VERSION 0 |
Definition at line 143 of file optional.hpp.
#define optional_COMPILER_MSVC_VERSION 0 |
Definition at line 135 of file optional.hpp.
#define optional_COMPILER_VERSION | ( | major, | |
minor, | |||
patch | |||
) | ( 10 * (10 * major + minor ) + patch ) |
Definition at line 138 of file optional.hpp.
#define optional_CONFIG_ALIGN_AS_FALLBACK double |
Definition at line 116 of file optional.hpp.
#define optional_CONFIG_MAX_ALIGN_HACK 0 |
Definition at line 108 of file optional.hpp.
#define optional_CONFIG_SELECT_OPTIONAL ( optional_HAVE_STD_OPTIONAL ? optional_OPTIONAL_STD : optional_OPTIONAL_NONSTD ) |
Definition at line 30 of file optional.hpp.
#define optional_constexpr /*constexpr*/ |
Definition at line 246 of file optional.hpp.
#define optional_constexpr14 /*constexpr*/ |
Definition at line 252 of file optional.hpp.
#define optional_CPLUSPLUS __cplusplus |
Definition at line 40 of file optional.hpp.
#define optional_CPLUSPLUS_V ( optional_CPLUSPLUS / 100 - (optional_CPLUSPLUS > 200000 ? 2000 : 1994) ) |
Definition at line 52 of file optional.hpp.
#define optional_CPP11_OR_GREATER ( optional_CPLUSPLUS >= 201103L ) |
Definition at line 45 of file optional.hpp.
#define optional_CPP14_OR_GREATER ( optional_CPLUSPLUS >= 201402L ) |
Definition at line 46 of file optional.hpp.
#define optional_CPP17_OR_GREATER ( optional_CPLUSPLUS >= 201703L ) |
Definition at line 47 of file optional.hpp.
#define optional_CPP20_OR_GREATER ( optional_CPLUSPLUS >= 202000L ) |
Definition at line 48 of file optional.hpp.
#define optional_CPP98_OR_GREATER ( optional_CPLUSPLUS >= 199711L ) |
Definition at line 44 of file optional.hpp.
#define optional_HAVE | ( | FEATURE | ) | ( optional_HAVE_##FEATURE ) |
Definition at line 164 of file optional.hpp.
#define optional_HAVE_STD_OPTIONAL 0 |
Definition at line 63 of file optional.hpp.
#define optional_lite_MAJOR 3 |
Definition at line 14 of file optional.hpp.
#define optional_lite_MINOR 1 |
Definition at line 15 of file optional.hpp.
#define optional_lite_PATCH 0 |
Definition at line 16 of file optional.hpp.
#define optional_lite_VERSION optional_STRINGIFY(optional_lite_MAJOR) "." optional_STRINGIFY(optional_lite_MINOR) "." optional_STRINGIFY(optional_lite_PATCH) |
Definition at line 18 of file optional.hpp.
#define optional_noexcept /*noexcept*/ |
Definition at line 258 of file optional.hpp.
#define optional_nullptr NULL |
Definition at line 264 of file optional.hpp.
#define optional_OPTIONAL_DEFAULT 0 |
Definition at line 25 of file optional.hpp.
#define optional_OPTIONAL_NONSTD 1 |
Definition at line 26 of file optional.hpp.
#define optional_OPTIONAL_STD 2 |
Definition at line 27 of file optional.hpp.
#define optional_ref_qual /*&*/ |
Definition at line 271 of file optional.hpp.
#define optional_refref_qual /*&&*/ |
Definition at line 272 of file optional.hpp.
#define optional_STRINGIFY | ( | x | ) | optional_STRINGIFY_( x ) |
Definition at line 20 of file optional.hpp.
#define optional_STRINGIFY_ | ( | x | ) | #x |
Definition at line 21 of file optional.hpp.
#define optional_USES_STD_OPTIONAL ( (optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_STD) || ((optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_DEFAULT) && optional_HAVE_STD_OPTIONAL) ) |
Definition at line 66 of file optional.hpp.