C++11 Mapping for Optional Values

Slice optional data members and parameters are mapped to Ice::optional<T> values.

The template Ice::optional is a placeholder for the future C++17 std::optional, and provides the same functions, with identical semantics. Please refer to std::optional for a full description of this template class and its associated functions, types and objects:

C++
// When std::optional is available, Ice::optional and the associated functions, types and objects will be defined as follows:
 
namespace Ice
{
    template<class T> using optional = std::optional<T>;

    using std::operator==;
    using std::operator!=;
    using std::operator<;
    using std::operator<=;
    using std:operator>;
    using std::operator>=;

    using std::make_optional;
    using std::swap;
    using nullopt_t = std::nullopt_t;
    using std::nullopt;
    using bad_optional_access = std::bad_optional_access;
    using in_place_t = std::in_place_t;
    using std::in_place;
}


See Also