proxygen
|
#include <functional>
#include <limits>
#include <memory>
#include <type_traits>
#include <folly/Portability.h>
Go to the source code of this file.
Namespaces | |
folly | |
—— Concurrent Priority Queue Implementation —— | |
folly::detail | |
folly::traits_detail | |
folly::traits_detail_IsEqualityComparable | |
folly::traits_detail_IsLessThanComparable | |
folly::traits_detail_IsNothrowSwappable | |
Macros | |
#define | FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) |
#define | FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL(classname, func_name, cv_qual) |
#define | FOLLY_CREATE_HAS_MEMBER_FN_TRAITS(classname, func_name) |
#define | FOLLY_HAS_TRUE_XXX(name) |
#define | FOLLY_ASSUME_RELOCATABLE(...) struct IsRelocatable<__VA_ARGS__> : std::true_type {} |
#define | FOLLY_ASSUME_FBVECTOR_COMPATIBLE(...) |
#define | FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(...) |
#define | FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(...) |
#define | FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(...) |
#define | FOLLY_ASSUME_FBVECTOR_COMPATIBLE_4(...) |
Typedefs | |
template<bool B> | |
using | folly::bool_constant = std::integral_constant< bool, B > |
template<std::size_t I> | |
using | folly::index_constant = std::integral_constant< std::size_t, I > |
template<typename T > | |
using | folly::_t = typename T::type |
template<typename T > | |
using | folly::remove_cvref_t = typename remove_cvref< T >::type |
template<typename Src , typename Dst > | |
using | folly::like_t = typename detail::like_< Src >::template apply< remove_cvref_t< Dst >> |
template<class T , class... Ts> | |
using | folly::type_t = typename traits_detail::type_t_< T, Ts... >::type |
template<class... Ts> | |
using | folly::void_t = type_t< void, Ts... > |
template<class T > | |
using | folly::is_trivially_copyable = std::is_trivially_copyable< T > |
template<typename TTheClass_ > | |
using | folly::traits_detail::has_IsRelocatable = typename std::conditional< has_IsRelocatable__folly_traits_impl__< TTheClass_ >::template test< TTheClass_ >(nullptr), std::true_type, std::false_type >::type |
template<typename TTheClass_ > | |
using | folly::traits_detail::has_IsZeroInitializable = typename std::conditional< has_IsZeroInitializable__folly_traits_impl__< TTheClass_ >::template test< TTheClass_ >(nullptr), std::true_type, std::false_type >::type |
template<class... > | |
using | folly::Ignored = Ignore |
template<typename T , typename... Ts> | |
using | folly::IsOneOf = StrictDisjunction< std::is_same< T, Ts >... > |
Functions | |
Ignore | folly::traits_detail_IsEqualityComparable::operator== (Ignore, Ignore) |
Ignore | folly::traits_detail_IsLessThanComparable::operator< (Ignore, Ignore) |
FOLLY_PUSH_WARNING | folly::detail::FOLLY_MSVC_DISABLE_WARNING (4388) FOLLY_MSVC_DISABLE_WARNING(4804) template< typename RHS |
FOLLY_PUSH_WARNING RHS LHS bool | folly::detail::less_than_impl (LHS const lhs) |
template<typename RHS , RHS rhs, typename LHS > | |
bool | folly::detail::greater_than_impl (LHS const lhs) |
template<typename T > | |
constexpr bool | folly::is_negative (T x) |
template<typename T > | |
constexpr bool | folly::is_non_positive (T x) |
template<typename T > | |
constexpr bool | folly::is_positive (T x) |
template<typename T > | |
constexpr bool | folly::is_non_negative (T x) |
template<typename RHS , RHS rhs, typename LHS > | |
bool | folly::less_than (LHS const lhs) |
template<typename RHS , RHS rhs, typename LHS > | |
bool | folly::greater_than (LHS const lhs) |
Variables | |
FOLLY_PUSH_WARNING RHS | folly::detail::rhs |
#define FOLLY_ASSUME_FBVECTOR_COMPATIBLE | ( | ... | ) |
The FOLLY_ASSUME_FBVECTOR_COMPATIBLE* macros below encode the assumption that the type is relocatable per IsRelocatable above. Many types can be assumed to satisfy this condition, but it is the responsibility of the user to state that assumption. User-defined classes will not be optimized for use with fbvector (see FBVector.h) unless they state that assumption.
Use FOLLY_ASSUME_FBVECTOR_COMPATIBLE with regular types like this:
FOLLY_ASSUME_FBVECTOR_COMPATIBLE(MyType)
The versions FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1, _2, _3, and _4 allow using the macro for describing templatized classes with 1, 2, 3, and 4 template parameters respectively. For template classes just use the macro with the appropriate number and pass the name of the template to it. Example:
template <class T1, class T2> class MyType { ... }; ... // Make sure you're at global scope FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(MyType)
#define FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1 | ( | ... | ) |
Definition at line 543 of file Traits.h.
Referenced by folly::literals::string_piece_literals::operator""_sp().
#define FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2 | ( | ... | ) |
#define FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3 | ( | ... | ) |
#define FOLLY_ASSUME_FBVECTOR_COMPATIBLE_4 | ( | ... | ) |
#define FOLLY_ASSUME_RELOCATABLE | ( | ... | ) | struct IsRelocatable<__VA_ARGS__> : std::true_type {} |
Use this macro ONLY inside namespace folly. When using it with a regular type, use it like this:
// Make sure you're at namespace folly scope template <> FOLLY_ASSUME_RELOCATABLE(MyType)
When using it with a template type, use it like this:
// Make sure you're at namespace folly scope template <class T1, class T2> FOLLY_ASSUME_RELOCATABLE(MyType<T1, T2>)
#define FOLLY_CREATE_HAS_MEMBER_FN_TRAITS | ( | classname, | |
func_name | |||
) |
#define FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL | ( | classname, | |
func_name, | |||
cv_qual | |||
) |
#define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS | ( | classname, | |
type_name | |||
) |
#define FOLLY_HAS_TRUE_XXX | ( | name | ) |