proxygen
folly::expected_detail::ExpectedUnion< Value, Error > Struct Template Reference

#include <Expected.h>

Inheritance diagram for folly::expected_detail::ExpectedUnion< Value, Error >:
folly::expected_detail::ExpectedStorage< Value, Error, StorageType::eUnion >

Public Member Functions

constexpr ExpectedUnion (EmptyTag) noexcept
 
template<class... Vs>
constexpr ExpectedUnion (ValueTag, Vs &&...vs) noexcept(noexcept(Value(static_cast< Vs && >(vs)...)))
 
template<class... Es>
constexpr ExpectedUnion (ErrorTag, Es &&...es) noexcept(noexcept(Error(static_cast< Es && >(es)...)))
 
 ExpectedUnion (const ExpectedUnion &)
 
 ExpectedUnion (ExpectedUnion &&) noexcept
 
ExpectedUnionoperator= (const ExpectedUnion &)
 
ExpectedUnionoperator= (ExpectedUnion &&) noexcept
 
 ~ExpectedUnion ()
 
Value & value ()&
 
const Value & value () const &
 
Value && value ()&&
 
Error & error ()&
 
const Error & error () const &
 
Error && error ()&&
 

Public Attributes

union {
   Value   value_
 
   Error   error_
 
   char   ch_ {}
 
}; 
 
Which which_ = Which::eEmpty
 

Detailed Description

template<class Value, class Error>
struct folly::expected_detail::ExpectedUnion< Value, Error >

Definition at line 265 of file Expected.h.

Constructor & Destructor Documentation

template<class Value , class Error >
constexpr folly::expected_detail::ExpectedUnion< Value, Error >::ExpectedUnion ( EmptyTag  )
inlineexplicitnoexcept

Definition at line 273 of file Expected.h.

273 {}
template<class Value , class Error >
template<class... Vs>
constexpr folly::expected_detail::ExpectedUnion< Value, Error >::ExpectedUnion ( ValueTag  ,
Vs &&...  vs 
)
inlineexplicitnoexcept
template<class Value , class Error >
template<class... Es>
constexpr folly::expected_detail::ExpectedUnion< Value, Error >::ExpectedUnion ( ErrorTag  ,
Es &&...  es 
)
inlineexplicitnoexcept
template<class Value , class Error >
folly::expected_detail::ExpectedUnion< Value, Error >::ExpectedUnion ( const ExpectedUnion< Value, Error > &  )
inline

Definition at line 282 of file Expected.h.

282 {}
template<class Value , class Error >
folly::expected_detail::ExpectedUnion< Value, Error >::ExpectedUnion ( ExpectedUnion< Value, Error > &&  )
inlinenoexcept

Definition at line 283 of file Expected.h.

283 {}
template<class Value , class Error >
folly::expected_detail::ExpectedUnion< Value, Error >::~ExpectedUnion ( )
inline

Definition at line 290 of file Expected.h.

290 {}

Member Function Documentation

template<class Value , class Error >
Error& folly::expected_detail::ExpectedUnion< Value, Error >::error ( )
inline

Definition at line 300 of file Expected.h.

300  {
301  return error_;
302  }
template<class Value , class Error >
const Error& folly::expected_detail::ExpectedUnion< Value, Error >::error ( ) const
inline

Definition at line 303 of file Expected.h.

303  {
304  return error_;
305  }
template<class Value , class Error >
Error&& folly::expected_detail::ExpectedUnion< Value, Error >::error ( )
inline

Definition at line 306 of file Expected.h.

References folly::gen::move.

306  {
307  return std::move(error_);
308  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class Value , class Error >
ExpectedUnion& folly::expected_detail::ExpectedUnion< Value, Error >::operator= ( const ExpectedUnion< Value, Error > &  )
inline

Definition at line 284 of file Expected.h.

284  {
285  return *this;
286  }
template<class Value , class Error >
ExpectedUnion& folly::expected_detail::ExpectedUnion< Value, Error >::operator= ( ExpectedUnion< Value, Error > &&  )
inlinenoexcept

Definition at line 287 of file Expected.h.

287  {
288  return *this;
289  }
template<class Value , class Error >
Value& folly::expected_detail::ExpectedUnion< Value, Error >::value ( )
inline

Definition at line 291 of file Expected.h.

291  {
292  return value_;
293  }
template<class Value , class Error >
const Value& folly::expected_detail::ExpectedUnion< Value, Error >::value ( ) const
inline

Definition at line 294 of file Expected.h.

294  {
295  return value_;
296  }
template<class Value , class Error >
Value&& folly::expected_detail::ExpectedUnion< Value, Error >::value ( )
inline

Definition at line 297 of file Expected.h.

References folly::gen::move.

297  {
298  return std::move(value_);
299  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Data Documentation

union { ... }
template<class Value , class Error >
char folly::expected_detail::ExpectedUnion< Value, Error >::ch_ {}

Definition at line 269 of file Expected.h.

template<class Value , class Error >
Error folly::expected_detail::ExpectedUnion< Value, Error >::error_

Definition at line 268 of file Expected.h.

template<class Value , class Error >
Value folly::expected_detail::ExpectedUnion< Value, Error >::value_

Definition at line 267 of file Expected.h.

template<class Value , class Error >
Which folly::expected_detail::ExpectedUnion< Value, Error >::which_ = Which::eEmpty

Definition at line 271 of file Expected.h.


The documentation for this struct was generated from the following file: