Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
Optional.h File Reference
#include <utility>
#include <type_traits>
#include <initializer_list>
#include <cassert>
#include <functional>
#include <string>
#include <stdexcept>
Include dependency graph for Optional.h:

Go to the source code of this file.

Namespaces

namespace  Ice
namespace  IceUtil

Macros

#define OPTIONAL_CONSTEXPR_INIT_LIST
#define OPTIONAL_HAS_CONSTEXPR_INIT_LIST   0
#define OPTIONAL_HAS_MOVE_ACCESSORS   0
#define OPTIONAL_HAS_THIS_RVALUE_REFS   0
#define OPTIONAL_MUTABLE_CONSTEXPR   constexpr
#define TR2_OPTIONAL_ASSERTED_EXPRESSION(CHECK, EXPR)
#define TR2_OPTIONAL_REQUIRES(...)

Typedefs

using Ice::bad_optional_access = std::experimental::Ice::bad_optional_access
 Raised when accessing an optional that doesn't contain a value.
using Ice::in_place_t = std::experimental::Ice::in_place_t
 This type indicates that an optional value should be constructed in place.
using Ice::nullopt_t = std::experimental::Ice::nullopt_t
 This type indicates that no value is provided.
template<class T>
using IceUtil::Optional = std::experimental::Ice::optional<T>
 For compatibility with the Ice C++98 mapping, do not use in new code:
template<class T>
using Ice::optional = std::experimental::Ice::optional<T>
 Ice::optional is a placeholder for std::optional.

Functions

template<class T>
constexpr optional< typename decay< T >::type > Ice::make_optional (T &&v)
 Creates an optional object.
template<class T>
constexpr bool Ice::operator!= (const optional< T > &x, const optional< T > &y)
template<class T>
constexpr bool Ice::operator< (const optional< T > &x, const optional< T > &y)
template<class T>
constexpr bool Ice::operator<= (const optional< T > &x, const optional< T > &y)
template<class T>
constexpr bool Ice::operator== (const optional< T > &x, const optional< T > &y)
template<class T>
constexpr bool Ice::operator> (const optional< T > &x, const optional< T > &y)
template<class T>
constexpr bool Ice::operator>= (const optional< T > &x, const optional< T > &y)
template<class T>
void Ice::swap (optional< T > &x, optional< T > &y) noexcept(noexcept(x.swap(y)))
 Exchanges the state of an optional object with another one.

Variables

constexpr struct std::experimental::Ice::in_place_t Ice::in_place
 An instance of in_place_t that indicates that an optional value should be constructed in place.
constexpr std::experimental::Ice::nullopt_t IceUtil::None {std::experimental::Ice::nullopt_t::init()}
 For compatibility with the Ice C++98 mapping, do not use in new code:
constexpr nullopt_t Ice::nullopt
 An instance of nullopt_t used as a marker value to indicate that no value is provided.

Macro Definition Documentation

◆ OPTIONAL_CONSTEXPR_INIT_LIST

#define OPTIONAL_CONSTEXPR_INIT_LIST

◆ OPTIONAL_HAS_CONSTEXPR_INIT_LIST

#define OPTIONAL_HAS_CONSTEXPR_INIT_LIST   0

◆ OPTIONAL_HAS_MOVE_ACCESSORS

#define OPTIONAL_HAS_MOVE_ACCESSORS   0

◆ OPTIONAL_HAS_THIS_RVALUE_REFS

#define OPTIONAL_HAS_THIS_RVALUE_REFS   0

◆ OPTIONAL_MUTABLE_CONSTEXPR

#define OPTIONAL_MUTABLE_CONSTEXPR   constexpr

◆ TR2_OPTIONAL_ASSERTED_EXPRESSION

#define TR2_OPTIONAL_ASSERTED_EXPRESSION ( CHECK,
EXPR )
Value:
((CHECK) ? (EXPR) : ([]{assert(false && #CHECK);}(), (EXPR)))

◆ TR2_OPTIONAL_REQUIRES

#define TR2_OPTIONAL_REQUIRES ( ...)
Value:
typename enable_if<__VA_ARGS__::value, bool>::type = false