Lines Matching defs:std

50 /// is held in a std::reference_wrapper<std::remove_reference<T>::type>, and
59 static const bool isRef = std::is_reference<T>::value;
61 using wrap = std::reference_wrapper<typename std::remove_reference<T>::type>;
64 using storage_type = typename std::conditional<isRef, wrap, T>::type;
67 using reference = typename std::remove_reference<T>::type &;
68 using const_reference = const typename std::remove_reference<T>::type &;
69 using pointer = typename std::remove_reference<T>::type *;
70 using const_pointer = const typename std::remove_reference<T>::type *;
75 typename std::enable_if<std::is_error_code_enum<E>::value ||
76 std::is_error_condition_enum<E>::value,
79 new (getErrorStorage()) std::error_code(make_error_code(ErrorCode));
82 ErrorOr(std::error_code EC) : HasError(true) {
83 new (getErrorStorage()) std::error_code(EC);
88 typename std::enable_if<std::is_convertible<OtherT, T>::value>::type
91 new (getStorage()) storage_type(std::forward<OtherT>(Val));
101 typename std::enable_if<std::is_convertible<OtherT, T>::value>::type * =
109 typename std::enable_if<
110 !std::is_convertible<OtherT, const T &>::value>::type * = nullptr) {
115 moveConstruct(std::move(Other));
121 typename std::enable_if<std::is_convertible<OtherT, T>::value>::type * =
123 moveConstruct(std::move(Other));
131 typename std::enable_if<!std::is_convertible<OtherT, T>::value>::type * =
133 moveConstruct(std::move(Other));
142 moveAssign(std::move(Other));
159 std::error_code getError() const {
160 return HasError ? *getErrorStorage() : std::error_code();
185 new (getErrorStorage()) std::error_code(Other.getError());
213 new (getStorage()) storage_type(std::move(*Other.getStorage()));
217 new (getErrorStorage()) std::error_code(Other.getError());
227 new (this) ErrorOr(std::move(Other));
252 std::error_code *getErrorStorage() {
254 return reinterpret_cast<std::error_code *>(ErrorStorage.buffer);
257 const std::error_code *getErrorStorage() const {
263 AlignedCharArrayUnion<std::error_code> ErrorStorage;
269 typename std::enable_if<std::is_error_code_enum<E>::value ||
270 std::is_error_condition_enum<E>::value,