5#ifndef ICE_UTIL_OPTIONAL_H
6#define ICE_UTIL_OPTIONAL_H
8#ifndef ICE_CPP11_MAPPING
12namespace IceUtilInternal
25const IceUtilInternal::NoneType
None = {};
33 typedef T element_type;
45 Optional(IceUtilInternal::NoneType) : _isSet(false)
62 Optional(Y p) : _value(p), _isSet(true)
82 Optional& operator=(IceUtilInternal::NoneType)
129 const T& value()
const
171 const T* operator->()
const
191 const T& operator*()
const
210 operator bool()
const
219 bool operator!()
const
230 std::swap(_isSet, other._isSet);
231 std::swap(_value, other._value);
243 void checkIsSet()
const
247 throwOptionalNotSetException(__FILE__, __LINE__);
251 void throwOptionalNotSetException(
const char *,
int)
const;
263makeOptional(
const T& v)
269template<
typename T>
inline void
276template<
typename T,
typename U>
289template<
typename T,
typename U>
295template<
typename T,
typename U>
308template<
typename T,
typename U>
311 return lhs < rhs || lhs == rhs;
314template<
typename T,
typename U>
317 return !(lhs < rhs || lhs == rhs);
320template<
typename T,
typename U>
328template<
typename T,
typename Y>
341template<
typename T,
typename Y>
347template<
typename T,
typename Y>
360template<
typename T,
typename Y>
363 return lhs < rhs || lhs == rhs;
366template<
typename T,
typename Y>
369 return !(lhs < rhs || lhs == rhs);
372template<
typename T,
typename Y>
380template<
typename T,
typename Y>
393template<
typename T,
typename Y>
399template<
typename T,
typename Y>
412template<
typename T,
typename Y>
415 return lhs < rhs || lhs == rhs;
418template<
typename T,
typename Y>
421 return !(lhs < rhs || lhs == rhs);
424template<
typename T,
typename Y>
This exception indicates an IceUtil::Optional is not set.
Definition Exception.h:372
Definition Optional.h:1095
bool operator>(const HandleBase< T > &lhs, const HandleBase< U > &rhs)
Definition Handle.h:130
bool operator<(const HandleBase< T > &lhs, const HandleBase< U > &rhs)
Definition Handle.h:109
bool operator<=(const HandleBase< T > &lhs, const HandleBase< U > &rhs)
Definition Handle.h:124
constexpr std::experimental::Ice::nullopt_t None
For compatibility with the Ice C++98 mapping, do not use in new code:
Definition Optional.h:1104
bool operator>=(const HandleBase< T > &lhs, const HandleBase< U > &rhs)
Definition Handle.h:136
std::experimental::Ice::optional< T > Optional
For compatibility with the Ice C++98 mapping, do not use in new code:
Definition Optional.h:1100
bool operator!=(const HandleBase< T > &lhs, const HandleBase< U > &rhs)
Definition Handle.h:103
bool operator==(const HandleBase< T > &lhs, const HandleBase< U > &rhs)
Definition Handle.h:88