|
proxygen
|
#include <cstddef>#include <initializer_list>#include <new>#include <stdexcept>#include <type_traits>#include <utility>#include <folly/CPortability.h>#include <folly/CppAttributes.h>#include <folly/Likely.h>#include <folly/Optional.h>#include <folly/Portability.h>#include <folly/Preprocessor.h>#include <folly/Traits.h>#include <folly/Unit.h>#include <folly/Utility.h>#include <folly/lang/ColdClass.h>#include <folly/lang/Exception.h>Go to the source code of this file.
Namespaces | |
| folly | |
| —— Concurrent Priority Queue Implementation —— | |
| folly::expected_detail | |
| folly::expected_detail::expected_detail_ExpectedHelper | |
Macros | |
| #define | FOLLY_EXPECTED_ID(X) FB_CONCATENATE(FB_CONCATENATE(Folly, X), __LINE__) |
| #define | FOLLY_REQUIRES_IMPL(...) |
| #define | FOLLY_REQUIRES_TRAILING(...) , FOLLY_REQUIRES_IMPL(__VA_ARGS__) |
| #define | FOLLY_REQUIRES(...) template <FOLLY_REQUIRES_IMPL(__VA_ARGS__)> |
Typedefs | |
| template<class Expected > | |
| using | folly::ExpectedValueType = typename std::remove_reference< Expected >::type::value_type |
| template<class Expected > | |
| using | folly::ExpectedErrorType = typename std::remove_reference< Expected >::type::error_type |
| template<template< class... > class Trait, class... Ts> | |
| using | folly::expected_detail::StrictAllOf = StrictConjunction< Trait< Ts >... > |
| template<class T > | |
| using | folly::expected_detail::IsCopyable = StrictConjunction< std::is_copy_constructible< T >, std::is_copy_assignable< T >> |
| template<class T > | |
| using | folly::expected_detail::IsMovable = StrictConjunction< std::is_move_constructible< T >, std::is_move_assignable< T >> |
| template<class T > | |
| using | folly::expected_detail::IsNothrowCopyable = StrictConjunction< std::is_nothrow_copy_constructible< T >, std::is_nothrow_copy_assignable< T >> |
| template<class T > | |
| using | folly::expected_detail::IsNothrowMovable = StrictConjunction< std::is_nothrow_move_constructible< T >, std::is_nothrow_move_assignable< T >> |
| template<class From , class To > | |
| using | folly::expected_detail::IsConvertible = StrictConjunction< std::is_constructible< To, From >, std::is_assignable< To &, From >> |
| using | folly::unexpected_t = expected_detail::UnexpectedTag(&)(expected_detail::UnexpectedTag) |
Functions | |
| template<class Error > | |
| constexpr Unexpected< typename std::decay< Error >::type > | folly::makeUnexpected (Error &&) |
| template<class Error , class Value > | |
| constexpr Expected< typename std::decay< Value >::type, Error > | folly::makeExpected (Value &&) |
| template<class T , class U > | |
| auto | folly::expected_detail::doEmplaceAssign (int, T &t, U &&u) -> decltype(void(t=static_cast< U && >(u))) |
| template<class T , class U > | |
| auto | folly::expected_detail::doEmplaceAssign (long, T &t, U &&u) -> decltype(void(T(static_cast< U && >(u)))) |
| template<class T , class... Us> | |
| auto | folly::expected_detail::doEmplaceAssign (int, T &t, Us &&...us) -> decltype(void(t=T(static_cast< Us && >(us)...))) |
| template<class T , class... Us> | |
| auto | folly::expected_detail::doEmplaceAssign (long, T &t, Us &&...us) -> decltype(void(T(static_cast< Us && >(us)...))) |
| template<class Value , class Error > | |
| constexpr StorageType | folly::expected_detail::getStorageType () |
| template<class T > | |
| T && | folly::expected_detail::expected_detail_ExpectedHelper::operator, (T &&t, Unit) noexcept |
| expected_detail::UnexpectedTag | folly::unexpected (expected_detail::UnexpectedTag={}) |
| template<class Error , bool FB_CONCATENATE = false, typename std::enable_if< (FB_CONCATENATE(FB_CONCATENATE(Folly, Requires), __LINE__)||static_cast< bool >(IsEqualityComparable< Error >::value)), int >::type = 0> | |
| bool | folly::operator== (const Unexpected< Error > &lhs, const Unexpected< Error > &rhs) |
| template<class Error , bool FB_CONCATENATE = false, typename std::enable_if< (FB_CONCATENATE(FB_CONCATENATE(Folly, Requires), __LINE__)||static_cast< bool >(IsEqualityComparable< Error >::value)), int >::type = 0> | |
| bool | folly::operator!= (const Unexpected< Error > &lhs, const Unexpected< Error > &rhs) |
| template<class Value , class Error > | |
| std::enable_if< IsEqualityComparable< Value >::value, bool >::type | folly::operator== (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
| template<class Value , class Error , bool FB_CONCATENATE = false, typename std::enable_if< (FB_CONCATENATE(FB_CONCATENATE(Folly, Requires), __LINE__)||static_cast< bool >(IsEqualityComparable< Value >::value)), int >::type = 0> | |
| bool | folly::operator!= (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
| template<class Value , class Error > | |
| std::enable_if< IsLessThanComparable< Value >::value, bool >::type | folly::operator< (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
| template<class Value , class Error , bool FB_CONCATENATE = false, typename std::enable_if< (FB_CONCATENATE(FB_CONCATENATE(Folly, Requires), __LINE__)||static_cast< bool >(IsLessThanComparable< Value >::value)), int >::type = 0> | |
| bool | folly::operator<= (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
| template<class Value , class Error , bool FB_CONCATENATE = false, typename std::enable_if< (FB_CONCATENATE(FB_CONCATENATE(Folly, Requires), __LINE__)||static_cast< bool >(IsLessThanComparable< Value >::value)), int >::type = 0> | |
| bool | folly::operator> (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
| template<class Value , class Error , bool FB_CONCATENATE = false, typename std::enable_if< (FB_CONCATENATE(FB_CONCATENATE(Folly, Requires), __LINE__)||static_cast< bool >(IsLessThanComparable< Value >::value)), int >::type = 0> | |
| bool | folly::operator>= (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
| template<class Value , class Error > | |
| void | folly::swap (Expected< Value, Error > &lhs, Expected< Value, Error > &rhs) noexcept(expected_detail::StrictAllOf< IsNothrowSwappable, Value, Error >::value) |
| template<class Value , class Error > | |
| const Value * | folly::get_pointer (const Expected< Value, Error > &ex) noexcept |
| template<class Value , class Error > | |
| Value * | folly::get_pointer (Expected< Value, Error > &ex) noexcept |
| template<class Value , class Error > | |
| bool | folly::operator== (const Expected< Value, Error > &, const Value &other)=delete |
| template<class Value , class Error > | |
| bool | folly::operator!= (const Expected< Value, Error > &, const Value &other)=delete |
| template<class Value , class Error > | |
| bool | folly::operator< (const Expected< Value, Error > &, const Value &other)=delete |
| template<class Value , class Error > | |
| bool | folly::operator<= (const Expected< Value, Error > &, const Value &other)=delete |
| template<class Value , class Error > | |
| bool | folly::operator>= (const Expected< Value, Error > &, const Value &other)=delete |
| template<class Value , class Error > | |
| bool | folly::operator> (const Expected< Value, Error > &, const Value &other)=delete |
| template<class Value , class Error > | |
| bool | folly::operator== (const Value &other, const Expected< Value, Error > &)=delete |
| template<class Value , class Error > | |
| bool | folly::operator!= (const Value &other, const Expected< Value, Error > &)=delete |
| template<class Value , class Error > | |
| bool | folly::operator< (const Value &other, const Expected< Value, Error > &)=delete |
| template<class Value , class Error > | |
| bool | folly::operator<= (const Value &other, const Expected< Value, Error > &)=delete |
| template<class Value , class Error > | |
| bool | folly::operator>= (const Value &other, const Expected< Value, Error > &)=delete |
| template<class Value , class Error > | |
| bool | folly::operator> (const Value &other, const Expected< Value, Error > &)=delete |
| #define FOLLY_EXPECTED_ID | ( | X | ) | FB_CONCATENATE(FB_CONCATENATE(Folly, X), __LINE__) |
Like folly::Optional, but can store a value or an error.
Definition at line 43 of file Expected.h.
| #define FOLLY_REQUIRES | ( | ... | ) | template <FOLLY_REQUIRES_IMPL(__VA_ARGS__)> |
Definition at line 53 of file Expected.h.
Referenced by folly::Expected< int, E >::Expected(), and folly::Expected< int, E >::operator=().
| #define FOLLY_REQUIRES_IMPL | ( | ... | ) |
Definition at line 45 of file Expected.h.
| #define FOLLY_REQUIRES_TRAILING | ( | ... | ) | , FOLLY_REQUIRES_IMPL(__VA_ARGS__) |
Definition at line 51 of file Expected.h.
Referenced by folly::Expected< int, E >::Expected(), folly::Expected< int, E >::get_pointer(), folly::operator<(), folly::operator<=(), folly::Expected< int, E >::operator=(), folly::operator==(), folly::operator>(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::return_(), folly::Expected< int, E >::then(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::then_(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::thenOrThrow_(), and folly::Unexpected< Error >::Unexpected().