proxygen
|
—— Concurrent Priority Queue Implementation —— More...
Typedefs | |
template<class KeyT , class ValueT , class HashFcn = std::hash<KeyT>, class EqualFcn = std::equal_to<KeyT>, class Allocator = std::allocator<char>> | |
using | QuadraticProbingAtomicHashMap = AtomicHashMap< KeyT, ValueT, HashFcn, EqualFcn, Allocator, AtomicHashArrayQuadraticProbeFcn > |
template<typename Key , typename Value , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>, bool SkipKeyValueDeletion = (boost::has_trivial_destructor<Key>::value && boost::has_trivial_destructor<Value>::value), template< typename > class Atom = std::atomic, typename Allocator = folly::detail::MMapAlloc> | |
using | AtomicUnorderedInsertMap64 = AtomicUnorderedInsertMap< Key, Value, Hash, KeyEqual, SkipKeyValueDeletion, Atom, uint64_t, Allocator > |
typedef function< detail::TimeIterPair(unsigned int)> | BenchmarkFun |
typedef FallbackGetcpu< HashingThreadId > | FallbackGetcpuType |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = 7, typename WeightFn = DefaultWeightFn<T>, template< typename > class Atom = std::atomic> | |
using | DSPSCQueue = DynamicBoundedQueue< T, true, true, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom > |
Aliases. More... | |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = 7, typename WeightFn = DefaultWeightFn<T>, template< typename > class Atom = std::atomic> | |
using | DMPSCQueue = DynamicBoundedQueue< T, false, true, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom > |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = 7, typename WeightFn = DefaultWeightFn<T>, template< typename > class Atom = std::atomic> | |
using | DSPMCQueue = DynamicBoundedQueue< T, true, false, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom > |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = 7, typename WeightFn = DefaultWeightFn<T>, template< typename > class Atom = std::atomic> | |
using | DMPMCQueue = DynamicBoundedQueue< T, false, false, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom > |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = constexpr_log2(hardware_destructive_interference_size), template< typename > class Atom = std::atomic> | |
using | USPSCQueue = UnboundedQueue< T, true, true, MayBlock, LgSegmentSize, LgAlign, Atom > |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = constexpr_log2(hardware_destructive_interference_size), template< typename > class Atom = std::atomic> | |
using | UMPSCQueue = UnboundedQueue< T, false, true, MayBlock, LgSegmentSize, LgAlign, Atom > |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = constexpr_log2(hardware_destructive_interference_size), template< typename > class Atom = std::atomic> | |
using | USPMCQueue = UnboundedQueue< T, true, false, MayBlock, LgSegmentSize, LgAlign, Atom > |
template<typename T , bool MayBlock, size_t LgSegmentSize = 8, size_t LgAlign = constexpr_log2(hardware_destructive_interference_size), template< typename > class Atom = std::atomic> | |
using | UMPMCQueue = UnboundedQueue< T, false, false, MayBlock, LgSegmentSize, LgAlign, Atom > |
template<typename Container , bool implicit_unpack = true> | |
using | emplace_iterator = detail::emplace_iterator_impl< detail::Emplace, Container, implicit_unpack > |
template<typename Container , bool implicit_unpack = true> | |
using | hint_emplace_iterator = detail::emplace_iterator_impl< detail::EmplaceHint, Container, implicit_unpack > |
template<typename Container , bool implicit_unpack = true> | |
using | front_emplace_iterator = detail::emplace_iterator_impl< detail::EmplaceFront, Container, implicit_unpack > |
template<typename Container , bool implicit_unpack = true> | |
using | back_emplace_iterator = detail::emplace_iterator_impl< detail::EmplaceBack, Container, implicit_unpack > |
template<class... Ts> | |
using | PolyMembers = detail::TypeList< Ts... > |
using | Func = Function< void()> |
using | SyncVecThreadPoolExecutors = folly::Synchronized< std::vector< ThreadPoolExecutor * >> |
template<class Expected > | |
using | ExpectedValueType = typename std::remove_reference< Expected >::type::value_type |
template<class Expected > | |
using | ExpectedErrorType = typename std::remove_reference< Expected >::type::error_type |
using | unexpected_t = expected_detail::UnexpectedTag(&)(expected_detail::UnexpectedTag) |
typedef std::vector< HugePageSize > | HugePageSizeVec |
using | DefaultRefCount = TLRefCount |
using | StringKeyedSet = StringKeyedSetBase<> |
template<class Hash = f14::DefaultHasher<std::string>, class Eq = f14::DefaultKeyEqual<std::string>, class Alloc = f14::DefaultAlloc<std::string>> | |
using | BasicStringKeyedUnorderedSet = F14NodeSet< std::string, Hash, Eq, Alloc > |
using | StringKeyedUnorderedSet = BasicStringKeyedUnorderedSet<> |
typedef basic_fbstring< char > | fbstring |
template<std::size_t N> | |
using | FixedString = BasicFixedString< char, N > |
template<typename Tuple > | |
using | index_sequence_for_tuple = make_index_sequence< std::tuple_size< Tuple >::value > |
template<typename F , typename Tuple > | |
using | apply_result_t = invoke_result_t< ApplyInvoke, F, Tuple > |
template<typename F , typename... Args> | |
using | invoke_result_t = typename invoke_result< F, Args... >::type |
using | Duration = std::chrono::milliseconds |
template<typename F , typename T , typename ItT > | |
using | MaybeTryArg = typename std::conditional< is_invocable< F, T &&, Try< ItT > && >::value, Try< ItT >, ItT >::type |
typedef std::unique_ptr< int > | A |
template<class T > | |
using | EnableIfFuture = typename std::enable_if< isFuture< T >::value >::type |
template<class T > | |
using | EnableUnlessFuture = typename std::enable_if<!isFuture< T >::value >::type |
template<typename T > | |
using | IndexedMemPoolTraitsLazyRecycle = IndexedMemPoolTraits< T, false, false > |
template<typename T > | |
using | IndexedMemPoolTraitsEagerRecycle = IndexedMemPoolTraits< T, true, true > |
using | IntrusiveListHook = boost::intrusive::list_member_hook< boost::intrusive::link_mode< boost::intrusive::auto_unlink >> |
template<typename T , IntrusiveListHook T::* PtrToMember> | |
using | IntrusiveList = boost::intrusive::list< T, boost::intrusive::member_hook< T, IntrusiveListHook, PtrToMember >, boost::intrusive::constant_time_size< false >> |
using | SafeIntrusiveListHook = boost::intrusive::list_member_hook< boost::intrusive::link_mode< boost::intrusive::safe_link >> |
template<typename T , SafeIntrusiveListHook T::* PtrToMember> | |
using | CountedIntrusiveList = boost::intrusive::list< T, boost::intrusive::member_hook< T, SafeIntrusiveListHook, PtrToMember >, boost::intrusive::constant_time_size< true >> |
using | Cob = Func |
typedef Range< const char * > | StringPiece |
typedef std::shared_ptr< SSLContext > | SSLContextPtr |
typedef std::pair< IPAddressV4, uint8_t > | CIDRNetworkV4 |
typedef std::array< uint8_t, 4 > | ByteArray4 |
typedef std::pair< IPAddressV6, uint8_t > | CIDRNetworkV6 |
typedef std::array< uint8_t, 16 > | ByteArray16 |
template<typename T , typename Alloc > | |
using | ArenaAllocator = CxxAllocatorAdaptor< T, Arena< Alloc >> |
template<typename T > | |
using | SysArenaAllocator = ArenaAllocator< T, SysAllocator< void >> |
template<typename T > | |
using | ThreadCachedArenaAllocator = CxxAllocatorAdaptor< T, ThreadCachedArena > |
using | SysBufferUniquePtr = std::unique_ptr< void, SysBufferDeleter > |
typedef MicroLockBase | MicroLock |
template<class Node , class Tfx = detail::MetaIdentity, class Access = detail::PolyAccess> | |
using | PolySelf = decltype(Access::template self_< Node, Tfx >()) |
using | PolyDecay = detail::MetaQuote< std::decay_t > |
using | libevent_fd_t = int |
using | EventSetCallback = void(*)(libevent_fd_t, short, void *) |
typedef Range< char * > | MutableStringPiece |
typedef Range< const unsigned char * > | ByteRange |
typedef Range< unsigned char * > | MutableByteRange |
typedef SharedMutexImpl< true > | SharedMutexReadPriority |
typedef SharedMutexImpl< false > | SharedMutexWritePriority |
typedef SharedMutexWritePriority | SharedMutex |
typedef SharedMutexImpl< false, void, std::atomic, false, false > | SharedMutexSuppressTSAN |
typedef SpinLockGuardImpl< SpinLock > | SpinLockGuard |
using | monotonic_clock = std::chrono::steady_clock |
template<typename Duration = folly::chrono::coarse_steady_clock::duration> | |
using | coarse_stop_watch = custom_stop_watch< folly::chrono::coarse_steady_clock, Duration > |
template<typename Duration = std::chrono::steady_clock::duration> | |
using | stop_watch = custom_stop_watch< std::chrono::steady_clock, Duration > |
using | atomic_uint_fast_wait_t = std::atomic< std::uint32_t > |
using | once_flag = basic_once_flag< SharedMutex > |
using | DistributedMutex = detail::distributed_mutex::DistributedMutex<> |
template<template< typename > class Atom> | |
using | aligned_hazptr_holder = typename std::aligned_storage< sizeof(hazptr_holder< Atom >), alignof(hazptr_holder< Atom >)>::type |
typedef LifoSemImpl | LifoSem |
typedef std::lock_guard< MicroSpinLock > | MSLGuard |
using | rcu_reader = rcu_reader_domain< RcuTag > |
template<class Mutex > | |
using | MutexLevelValue = detail::MutexLevelValueImpl< true, LockTraits< Mutex >::is_shared, LockTraits< Mutex >::is_upgrade > |
using | SynchronizedTestTypes = testing::Types< folly::SharedMutexReadPriority, folly::SharedMutexWritePriority, std::mutex, std::recursive_mutex, boost::mutex, boost::recursive_mutex, boost::shared_mutex, folly::SpinLock > |
using | SynchronizedTimedTestTypes = testing::Types< folly::SharedMutexReadPriority, folly::SharedMutexWritePriority > |
using | SynchronizedTimedWithConstTestTypes = testing::Types< folly::SharedMutexReadPriority, folly::SharedMutexWritePriority > |
using | CountPair = std::pair< int, int > |
template<typename LockPolicy > | |
using | LPtr = LockedPtr< Synchronized< int >, LockPolicy > |
using | TokenBucket = BasicTokenBucket<> |
using | DynamicTokenBucket = BasicDynamicTokenBucket<> |
template<bool B> | |
using | bool_constant = std::integral_constant< bool, B > |
template<std::size_t I> | |
using | index_constant = std::integral_constant< std::size_t, I > |
template<typename T > | |
using | _t = typename T::type |
template<typename T > | |
using | remove_cvref_t = typename remove_cvref< T >::type |
template<typename Src , typename Dst > | |
using | like_t = typename detail::like_< Src >::template apply< remove_cvref_t< Dst >> |
template<class T , class... Ts> | |
using | type_t = typename traits_detail::type_t_< T, Ts... >::type |
template<class... Ts> | |
using | void_t = type_t< void, Ts... > |
template<class T > | |
using | is_trivially_copyable = std::is_trivially_copyable< T > |
template<class... > | |
using | Ignored = Ignore |
template<typename T , typename... Ts> | |
using | IsOneOf = StrictDisjunction< std::is_same< T, Ts >... > |
template<typename T > | |
using | lift_unit_t = typename lift_unit< T >::type |
template<typename T > | |
using | drop_unit_t = typename drop_unit< T >::type |
using | UTF8StringPiece = UTF8Range< const char * > |
template<std::size_t... Ints> | |
using | index_sequence = integer_sequence< std::size_t, Ints... > |
template<typename T , std::size_t Size> | |
using | make_integer_sequence = typename utility_detail::make_seq< Size >::template apply< integer_sequence< T >, integer_sequence< T, 0 >> |
template<std::size_t Size> | |
using | make_index_sequence = make_integer_sequence< std::size_t, Size > |
template<class... T> | |
using | index_sequence_for = make_index_sequence< sizeof...(T)> |
using | in_place_t = in_place_tag(&)(in_place_tag) |
template<class T > | |
using | in_place_type_t = in_place_type_tag< T >(&)(in_place_type_tag< T >) |
template<std::size_t I> | |
using | in_place_index_t = in_place_index_tag< I >(&)(in_place_index_tag< I >) |
using | MoveOnly = moveonly_::MoveOnly |
Functions | |
vector< detail::BenchmarkRegistration > & | benchmarks () |
BENCHMARK (fbFollyGlobalBenchmarkBaseline) | |
size_t | getGlobalBenchmarkBaselineIndex () |
static double | estimateTime (double *begin, double *end) |
static double | runBenchmarkGetNSPerIteration (const BenchmarkFun &fun, const double globalBaseline) |
static string | humanReadable (double n, unsigned int decimals, const ScaleInfo *scales) |
static string | readableTime (double n, unsigned int decimals) |
static string | metricReadable (double n, unsigned int decimals) |
static void | printBenchmarkResultsAsJson (const vector< detail::BenchmarkResult > &data) |
static void | printBenchmarkResultsAsVerboseJson (const vector< detail::BenchmarkResult > &data) |
static void | printBenchmarkResults (const vector< detail::BenchmarkResult > &data) |
void | benchmarkResultsToDynamic (const vector< detail::BenchmarkResult > &data, dynamic &out) |
void | benchmarkResultsFromDynamic (const dynamic &d, vector< detail::BenchmarkResult > &results) |
static pair< StringPiece, StringPiece > | resultKey (const detail::BenchmarkResult &result) |
void | printResultComparison (const vector< detail::BenchmarkResult > &base, const vector< detail::BenchmarkResult > &test) |
void | checkRunMode () |
void | runBenchmarks () |
bool | runBenchmarksOnFlag () |
template<typename Lambda > | |
std::enable_if< boost::function_types::function_arity< decltype(&Lambda::operator())>::value==2 >::type | addBenchmark (const char *file, const char *name, Lambda &&lambda) |
template<typename Lambda > | |
std::enable_if< boost::function_types::function_arity< decltype(&Lambda::operator())>::value==1 >::type | addBenchmark (const char *file, const char *name, Lambda &&lambda) |
template<typename T > | |
auto | doNotOptimizeAway (const T &datum) -> typename std::enable_if< !detail::DoNotOptimizeAwayNeedsIndirect< T >::value >::type |
template<typename T > | |
auto | makeUnpredictable (T &datum) -> typename std::enable_if< !detail::DoNotOptimizeAwayNeedsIndirect< T >::value >::type |
template<typename Tgt > | |
std::enable_if< detail::is_duration< Tgt >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const struct timespec &ts) |
template<typename Tgt > | |
std::enable_if< detail::is_duration< Tgt >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const struct timeval &tv) |
template<typename Tgt , typename Src > | |
std::enable_if< detail::is_time_point< Tgt >::value &&detail::is_posix_time_type< Src >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const Src &value) |
template<typename Tgt , typename Rep , typename Period > | |
std::enable_if< std::is_same< Tgt, struct timespec >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const std::chrono::duration< Rep, Period > &duration) |
template<typename Tgt , typename Rep , typename Period > | |
std::enable_if< std::is_same< Tgt, struct timeval >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const std::chrono::duration< Rep, Period > &duration) |
template<typename Tgt , typename Clock , typename Duration > | |
std::enable_if< detail::is_posix_time_type< Tgt >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const std::chrono::time_point< Clock, Duration > &timePoint) |
template<typename Tgt , typename Src > | |
std::enable_if< detail::is_chrono_conversion< Tgt, Src >::value, Tgt >::type | to (const Src &value) |
FOLLY_ATTR_WEAK folly::Function< void(double)> | makeCompressionCounterHandler (folly::io::CodecType, folly::StringPiece, folly::Optional< int >, CompressionCounterKey, CompressionCounterType) |
static CacheLocality | getSystemLocalityInfo () |
Returns the best real CacheLocality information available. More... | |
template<> | |
const CacheLocality & | CacheLocality::system< std::atomic > () |
static size_t | parseLeadingNumber (const std::string &line) |
template<typename T , size_t Stripes> | |
CxxAllocatorAdaptor< T, typename CoreRawAllocator< Stripes >::Allocator > | getCoreAllocator (size_t stripe) |
template<typename T > | |
constexpr T | constexpr_max (T a) |
template<typename T , typename... Ts> | |
constexpr T | constexpr_max (T a, T b, Ts...ts) |
template<typename T > | |
constexpr T | constexpr_min (T a) |
template<typename T , typename... Ts> | |
constexpr T | constexpr_min (T a, T b, Ts...ts) |
template<typename T , typename Less > | |
constexpr T const & | constexpr_clamp (T const &v, T const &lo, T const &hi, Less less) |
template<typename T > | |
constexpr T const & | constexpr_clamp (T const &v, T const &lo, T const &hi) |
template<typename T > | |
constexpr auto | constexpr_abs (T t) -> decltype(detail::constexpr_abs_helper< T >::go(t)) |
template<typename T > | |
constexpr T | constexpr_log2 (T t) |
template<typename T > | |
constexpr T | constexpr_log2_ceil (T t) |
template<typename T > | |
constexpr T | constexpr_ceil (T t, T round) |
template<typename T > | |
constexpr T | constexpr_pow (T base, std::size_t exp) |
template<typename T > | |
constexpr std::size_t | constexpr_find_last_set (T const t) |
template<typename T > | |
constexpr std::size_t | constexpr_find_first_set (T t) |
template<typename T > | |
constexpr T | constexpr_add_overflow_clamped (T a, T b) |
template<typename T > | |
constexpr T | constexpr_sub_overflow_clamped (T a, T b) |
template<typename Dst , typename Src > | |
constexpr std::enable_if< std::is_integral< Src >::value, Dst >::type | constexpr_clamp_cast (Src src) |
template<typename Dst , typename Src > | |
constexpr std::enable_if< std::is_floating_point< Src >::value, Dst >::type | constexpr_clamp_cast (Src src) |
template<typename C > | |
constexpr auto | size (C const &c) -> decltype(c.size()) |
template<typename T , std::size_t N> | |
constexpr std::size_t | size (T const (&)[N]) noexcept |
template<typename C > | |
constexpr auto | empty (C const &c) -> decltype(c.empty()) |
template<typename T , std::size_t N> | |
constexpr bool | empty (T const (&)[N]) noexcept |
template<typename E > | |
constexpr bool | empty (std::initializer_list< E > il) noexcept |
template<typename C > | |
constexpr auto | data (C &c) -> decltype(c.data()) |
template<typename C > | |
constexpr auto | data (C const &c) -> decltype(c.data()) |
template<typename T , std::size_t N> | |
constexpr T * | data (T(&a)[N]) noexcept |
template<typename E > | |
constexpr E const * | data (std::initializer_list< E > il) noexcept |
template<typename D = void, typename... TList> | |
constexpr array_detail::return_type< D, TList... > | make_array (TList &&...t) |
template<std::size_t Size, typename MakeItem > | |
constexpr auto | make_array_with (MakeItem const &make) |
template<class BaseIter > | |
BitIterator< BaseIter > | findFirstSet (BitIterator< BaseIter >, BitIterator< BaseIter >) |
template<class BaseIter > | |
BitIterator< BaseIter > | makeBitIterator (const BaseIter &iter) |
template<class Range > | |
detail::RangeEnumerator< Range > | enumerate (Range &&r) |
template<typename Sequence , typename Func > | |
FOLLY_CPP14_CONSTEXPR Func | for_each (Sequence &&sequence, Func func) |
template<typename Sequence , typename Index > | |
decltype(auto) FOLLY_CPP14_CONSTEXPR | fetch (Sequence &&sequence, Index &&index) |
template<typename Range , typename Func > | |
FOLLY_CPP14_CONSTEXPR Func | for_each (Range &&range, Func func) |
template<typename... Args> | |
emplace_args< Args... > | make_emplace_args (Args &&...args) noexcept(noexcept(emplace_args< Args... >(std::forward< Args >(args)...))) |
template<size_t I, typename... Args> | |
decltype(auto) | get_emplace_arg (emplace_args< Args... > &&args) noexcept |
template<size_t I, typename... Args> | |
decltype(auto) | get_emplace_arg (emplace_args< Args... > &args) noexcept |
template<size_t I, typename... Args> | |
decltype(auto) | get_emplace_arg (const emplace_args< Args... > &args) noexcept |
template<size_t I, typename Args > | |
decltype(auto) | get_emplace_arg (Args &&args) noexcept |
template<size_t I, typename Args > | |
decltype(auto) | get_emplace_arg (Args &args) noexcept |
template<size_t I, typename Args > | |
decltype(auto) | get_emplace_arg (const Args &args) noexcept |
template<bool implicit_unpack = true, typename Container > | |
emplace_iterator< Container, implicit_unpack > | emplacer (Container &c, typename Container::iterator i) |
template<bool implicit_unpack = true, typename Container > | |
hint_emplace_iterator< Container, implicit_unpack > | hint_emplacer (Container &c, typename Container::iterator i) |
template<bool implicit_unpack = true, typename Container > | |
front_emplace_iterator< Container, implicit_unpack > | front_emplacer (Container &c) |
template<bool implicit_unpack = true, typename Container > | |
back_emplace_iterator< Container, implicit_unpack > | back_emplacer (Container &c) |
template<class InputIt1 , class InputIt2 , class OutputIt , class Compare > | |
OutputIt | merge (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt d_first, Compare comp) |
template<class InputIt1 , class InputIt2 , class OutputIt > | |
OutputIt | merge (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt d_first) |
ConversionError | makeConversionError (ConversionCode code, StringPiece input) |
template<class Tgt , class Src > | |
std::enable_if< std::is_same< Tgt, typename std::decay< Src >::type >::value, Expected< Tgt, ConversionCode > >::type | tryTo (Src &&value) |
template<class Tgt , class Src > | |
std::enable_if< std::is_same< Tgt, typename std::decay< Src >::type >::value, Tgt >::type | to (Src &&value) |
template<class Tgt , class Src > | |
std::enable_if< std::is_arithmetic< Src >::value &&!std::is_same< Tgt, Src >::value &&std::is_same< Tgt, bool >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const Src &value) |
template<class Tgt , class Src > | |
std::enable_if< std::is_arithmetic< Src >::value &&!std::is_same< Tgt, Src >::value &&std::is_same< Tgt, bool >::value, Tgt >::type | to (const Src &value) |
uint32_t | digits10 (uint64_t v) |
uint32_t | uint64ToBufferUnsafe (uint64_t v, char *const buffer) |
template<class Tgt > | |
void | toAppend (char value, Tgt *result) |
template<class T > | |
constexpr std::enable_if< std::is_same< T, char >::value, size_t >::type | estimateSpaceNeeded (T) |
template<size_t N> | |
constexpr size_t | estimateSpaceNeeded (const char(&)[N]) |
template<class Tgt , class Src > | |
std::enable_if< std::is_convertible< Src, const char * >::value &&IsSomeString< Tgt >::value >::type | toAppend (Src value, Tgt *result) |
template<class Src > | |
std::enable_if< std::is_convertible< Src, const char * >::value, size_t >::type | estimateSpaceNeeded (Src value) |
template<class Src > | |
std::enable_if< IsSomeString< Src >::value, size_t >::type | estimateSpaceNeeded (Src const &value) |
template<class Src > | |
std::enable_if< std::is_convertible< Src, folly::StringPiece >::value &&!IsSomeString< Src >::value &&!std::is_convertible< Src, const char * >::value, size_t >::type | estimateSpaceNeeded (Src value) |
template<> | |
size_t | estimateSpaceNeeded (std::nullptr_t) |
template<class Src > | |
std::enable_if< std::is_pointer< Src >::value &&IsSomeString< std::remove_pointer< Src > >::value, size_t >::type | estimateSpaceNeeded (Src value) |
template<class Tgt , class Src > | |
std::enable_if< IsSomeString< Src >::value &&IsSomeString< Tgt >::value >::type | toAppend (const Src &value, Tgt *result) |
template<class Tgt > | |
std::enable_if< IsSomeString< Tgt >::value >::type | toAppend (StringPiece value, Tgt *result) |
template<class Tgt > | |
std::enable_if< IsSomeString< Tgt >::value >::type | toAppend (const fbstring &value, Tgt *result) |
template<class Tgt , class Src > | |
size_t::type | estimateSpaceNeeded (Src value) |
template<class Delimiter , class... Ts> | |
void | reserveInTargetDelim (const Delimiter &d, const Ts &...vs) |
template<class T , class Tgt > | |
std::enable_if< IsSomeString< typename std::remove_pointer< Tgt >::type >::value >::type | toAppendStrImpl (const T &v, Tgt result) |
folly::std enable_if::typetoAppendDelimStrImpl const Delimiter, const Tv, Tgtresult | sizeof (Ts) > |
folly::std enable_if::typetoAppendDelimStrImpl const Delimiter, const Tv, Tgtresult bool Tgt::type | to (const char *b, const char *e) |
template<typename Tgt > | |
FOLLY_NODISCARD std::enable_if< std::is_arithmetic< Tgt >::value, Expected< StringPiece, ConversionCode > >::type | parseTo (StringPiece src, Tgt &out) |
template<typename Tgt , typename Src > | |
std::enable_if< detail::IsArithToArith< Tgt, Src >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const Src &value) noexcept |
template<typename Tgt , typename Src > | |
std::enable_if< detail::IsArithToArith< Tgt, Src >::value, Tgt >::type | to (const Src &value) |
template<class T > | |
FOLLY_NODISCARD std::enable_if< std::is_enum< T >::value, Expected< StringPiece, ConversionCode > >::type | parseTo (StringPiece in, T &out) noexcept |
FOLLY_NODISCARD Expected< StringPiece, ConversionCode > | parseTo (StringPiece in, StringPiece &out) noexcept |
FOLLY_NODISCARD Expected< StringPiece, ConversionCode > | parseTo (StringPiece in, std::string &out) |
FOLLY_NODISCARD Expected< StringPiece, ConversionCode > | parseTo (StringPiece in, fbstring &out) |
template<class Tgt > | |
std::enable_if< !std::is_same< StringPiece, Tgt >::value, Expected< Tgt, detail::ParseToError< Tgt > > >::type | tryTo (StringPiece src) |
template<class Tgt , class Src > | |
std::enable_if< IsSomeString< Src >::value &&!std::is_same< StringPiece, Tgt >::value, Tgt >::type | to (Src const &src) |
template<class Tgt > | |
std::enable_if<!std::is_same< StringPiece, Tgt >::value, Tgt >::type | to (StringPiece src) |
template<class Tgt > | |
Expected< Tgt, detail::ParseToError< Tgt > > | tryTo (StringPiece *src) |
template<class Tgt > | |
Tgt | to (StringPiece *src) |
template<class Tgt , class Src > | |
std::enable_if< std::is_enum< Src >::value &&!std::is_same< Src, Tgt >::value &&!std::is_convertible< Tgt, StringPiece >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const Src &value) |
template<class Tgt , class Src > | |
std::enable_if< !std::is_convertible< Src, StringPiece >::value &&std::is_enum< Tgt >::value &&!std::is_same< Src, Tgt >::value, Expected< Tgt, ConversionCode > >::type | tryTo (const Src &value) |
template<class Tgt , class Src > | |
std::enable_if< std::is_enum< Src >::value &&!std::is_same< Src, Tgt >::value &&!std::is_convertible< Tgt, StringPiece >::value, Tgt >::type | to (const Src &value) |
template<class Tgt , class Src > | |
std::enable_if< !std::is_convertible< Src, StringPiece >::value &&std::is_enum< Tgt >::value &&!std::is_same< Src, Tgt >::value, Tgt >::type | to (const Src &value) |
fbstring | demangle (const char *name) |
size_t | demangle (const char *name, char *out, size_t outSize) |
size_t | strlcpy (char *dest, const char *const src, size_t size) |
fbstring | demangle (const std::type_info &type) |
size_t | demangle (const std::type_info &type, char *buf, size_t bufSize) |
template<class T , class I > | |
detail::AddCvrefOf< T, I > & | poly_cast (detail::PolyRoot< I > &) |
template<class T , class I > | |
detail::AddCvrefOf< T, I > const & | poly_cast (detail::PolyRoot< I > const &) |
template<typename Visitor , typename... Args> | |
decltype(auto) | apply_visitor (Visitor &&visitor, const DiscriminatedPtr< Args... > &variant) |
template<typename Visitor , typename... Args> | |
decltype(auto) | apply_visitor (Visitor &&visitor, DiscriminatedPtr< Args... > &variant) |
template<typename Visitor , typename... Args> | |
decltype(auto) | apply_visitor (Visitor &&visitor, DiscriminatedPtr< Args... > &&variant) |
std::ostream & | operator<< (std::ostream &out, dynamic const &d) |
template<typename T > | |
T | convertTo (const dynamic &) |
template<typename T > | |
dynamic | toDynamic (const T &) |
std::system_error | makeSystemErrorExplicit (int err, const char *msg) |
template<class... Args> | |
std::system_error | makeSystemErrorExplicit (int err, Args &&...args) |
std::system_error | makeSystemError (const char *msg) |
template<class... Args> | |
std::system_error | makeSystemError (Args &&...args) |
void | throwSystemErrorExplicit (int err, const char *msg) |
template<class... Args> | |
void | throwSystemErrorExplicit (int err, Args &&...args) |
template<class... Args> | |
void | throwSystemError (Args &&...args) |
template<class... Args> | |
void | checkPosixError (int err, Args &&...args) |
template<class... Args> | |
void | checkKernelError (ssize_t ret, Args &&...args) |
template<class... Args> | |
void | checkUnixError (ssize_t ret, Args &&...args) |
template<class... Args> | |
void | checkUnixErrorExplicit (ssize_t ret, int savedErrno, Args &&...args) |
template<class... Args> | |
void | checkFopenError (FILE *fp, Args &&...args) |
template<class... Args> | |
void | checkFopenErrorExplicit (FILE *fp, int savedErrno, Args &&...args) |
fbstring | exceptionStr (const std::exception &e) |
template<typename E > | |
auto | exceptionStr (const E &e) -> typename std::enable_if<!std::is_base_of< std::exception, E >::value, fbstring >::type |
fbstring | exceptionStr (exception_wrapper const &ew) |
template<class Ex , typename... As> | |
exception_wrapper | make_exception_wrapper (As &&...as) |
template<class Ch > | |
std::basic_ostream< Ch > & | operator<< (std::basic_ostream< Ch > &sout, exception_wrapper const &ew) |
void | swap (exception_wrapper &a, exception_wrapper &b) noexcept |
template<typename... Exceptions, typename F > | |
exception_wrapper | try_and_catch (F &&fn) |
template<typename ExecutorT > | |
Executor::KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT *executor) |
template<typename ExecutorT > | |
Executor::KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT &executor) |
template<class F > | |
auto | async (F &&fn) |
std::shared_ptr< Executor > | getCPUExecutor () |
void | setCPUExecutor (std::weak_ptr< Executor > executor) |
std::shared_ptr< IOExecutor > | getIOExecutor () |
void | setIOExecutor (std::weak_ptr< IOExecutor > executor) |
EventBase * | getEventBase () |
bool | isSequencedExecutor (folly::Executor &executor) |
void | testExecutor (folly::Executor &executor) |
void | testExecutor (folly::SequencedExecutor &executor) |
TEST (SequencedExecutor, CPUThreadPoolExecutor) | |
TEST (SequencedExecutor, SerialCPUThreadPoolExecutor) | |
TEST (SequencedExecutor, EventBase) | |
template<typename F > | |
static auto | with_unique_lock (std::mutex &m, F &&f) -> decltype(f()) |
SyncVecThreadPoolExecutors & | getSyncVecThreadPoolExecutors () |
DEFINE_int64 (threadtimeout_ms, 60000,"Idle time before ThreadPoolExecutor threads are joined") | |
template<class Error > | |
constexpr Unexpected< typename std::decay< Error >::type > | makeUnexpected (Error &&) |
template<class Error , class Value > | |
constexpr Expected< typename std::decay< Value >::type, Error > | makeExpected (Value &&) |
expected_detail::UnexpectedTag | 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 | 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 | operator!= (const Unexpected< Error > &lhs, const Unexpected< Error > &rhs) |
template<class Value , class Error > | |
std::enable_if< IsEqualityComparable< Value >::value, bool >::type | 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 | operator!= (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
template<class Value , class Error > | |
std::enable_if< IsLessThanComparable< Value >::value, bool >::type | 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 | 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 | 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 | operator>= (const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs) |
template<class Value , class Error > | |
void | swap (Expected< Value, Error > &lhs, Expected< Value, Error > &rhs) noexcept(expected_detail::StrictAllOf< IsNothrowSwappable, Value, Error >::value) |
template<class Value , class Error > | |
const Value * | get_pointer (const Expected< Value, Error > &ex) noexcept |
template<class Value , class Error > | |
Value * | get_pointer (Expected< Value, Error > &ex) noexcept |
template<class Value , class Error > | |
bool | operator== (const Expected< Value, Error > &, const Value &other)=delete |
template<class Value , class Error > | |
bool | operator!= (const Expected< Value, Error > &, const Value &other)=delete |
template<class Value , class Error > | |
bool | operator< (const Expected< Value, Error > &, const Value &other)=delete |
template<class Value , class Error > | |
bool | operator<= (const Expected< Value, Error > &, const Value &other)=delete |
template<class Value , class Error > | |
bool | operator>= (const Expected< Value, Error > &, const Value &other)=delete |
template<class Value , class Error > | |
bool | operator> (const Expected< Value, Error > &, const Value &other)=delete |
template<class Value , class Error > | |
bool | operator== (const Value &other, const Expected< Value, Error > &)=delete |
template<class Value , class Error > | |
bool | operator!= (const Value &other, const Expected< Value, Error > &)=delete |
template<class Value , class Error > | |
bool | operator< (const Value &other, const Expected< Value, Error > &)=delete |
template<class Value , class Error > | |
bool | operator<= (const Value &other, const Expected< Value, Error > &)=delete |
template<class Value , class Error > | |
bool | operator>= (const Value &other, const Expected< Value, Error > &)=delete |
template<class Value , class Error > | |
bool | operator> (const Value &other, const Expected< Value, Error > &)=delete |
template<class Logger = GoogleLogger<GoogleLoggerStyle::PRETTY>, class Clock = std::chrono::high_resolution_clock> | |
auto | makeAutoTimer (std::string &&msg="", const std::chrono::duration< double > &minTimeToLog=std::chrono::duration< double >::zero(), Logger &&logger=Logger()) |
std::ostream & | operator<< (std::ostream &os, const AsyncIOOp &op) |
std::ostream & | operator<< (std::ostream &os, AsyncIOOp::State state) |
const HugePageSizeVec & | getHugePageSizes () |
const HugePageSize * | getHugePageSize (size_t size) |
const HugePageSize * | getHugePageSizeForDevice (dev_t device) |
bool | operator< (const HugePageSize &a, const HugePageSize &b) |
bool | operator== (const HugePageSize &a, const HugePageSize &b) |
JemallocNodumpAllocator & | globalJemallocNodumpAllocator () |
po::options_description | getGFlags (ProgramOptionsStyle style) |
NestedCommandLineParseResult | parseNestedCommandLine (int argc, const char *const argv[], const po::options_description &desc) |
NestedCommandLineParseResult | parseNestedCommandLine (const std::vector< std::string > &cmdline, const po::options_description &desc) |
NestedCommandLineParseResult | parseNestedCommandLine (int argc, const char *const argv[], const boost::program_options::options_description &desc) |
NestedCommandLineParseResult | parseNestedCommandLine (const std::vector< std::string > &cmdline, const boost::program_options::options_description &desc) |
template<typename T , typename RefCount > | |
bool | operator== (const ReadMostlyMainPtr< T, RefCount > &ptr, std::nullptr_t) |
template<typename T , typename RefCount > | |
bool | operator== (std::nullptr_t, const ReadMostlyMainPtr< T, RefCount > &ptr) |
template<typename T , typename RefCount > | |
bool | operator== (const ReadMostlySharedPtr< T, RefCount > &ptr, std::nullptr_t) |
template<typename T , typename RefCount > | |
bool | operator== (std::nullptr_t, const ReadMostlySharedPtr< T, RefCount > &ptr) |
template<typename T , typename RefCount > | |
bool | operator!= (const ReadMostlyMainPtr< T, RefCount > &ptr, std::nullptr_t) |
template<typename T , typename RefCount > | |
bool | operator!= (std::nullptr_t, const ReadMostlyMainPtr< T, RefCount > &ptr) |
template<typename T , typename RefCount > | |
bool | operator!= (const ReadMostlySharedPtr< T, RefCount > &ptr, std::nullptr_t) |
template<typename T , typename RefCount > | |
bool | operator!= (std::nullptr_t, const ReadMostlySharedPtr< T, RefCount > &ptr) |
template<class Instructions > | |
uint64_t | select64 (uint64_t x, uint64_t k) |
template<> | |
FOLLY_ALWAYS_INLINE uint64_t | select64< compression::instructions::Haswell > (uint64_t x, uint64_t k) |
template<typename T > | |
StampedPtr< T > | makeStampedPtr (T *ptr, uint16_t stamp) |
template<class Alloc > | |
StringPiece | stringPieceDup (StringPiece piece, const Alloc &alloc) |
template<class Alloc > | |
void | stringPieceDel (StringPiece piece, const Alloc &alloc) |
TEST (LockFreeRingBuffer, writeReadSequentially) | |
TEST (LockFreeRingBuffer, writeReadSequentiallyBackward) | |
TEST (LockFreeRingBuffer, readsCanBlock) | |
template<typename T , template< typename > class Atom> | |
uint64_t | value (const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor) |
template<template< typename > class Atom> | |
void | runReader (LockFreeRingBuffer< int, Atom > &rb, std::atomic< int32_t > &writes) |
template<template< typename > class Atom> | |
void | runWritesNeverFail (int capacity, int writes, int writers) |
TEST (LockFreeRingBuffer, writesNeverFail) | |
TEST (LockFreeRingBuffer, readerCanDetectSkips) | |
TEST (LockFreeRingBuffer, currentTailRange) | |
TEST (LockFreeRingBuffer, cursorFromWrites) | |
TEST (LockFreeRingBuffer, moveBackwardsCanFail) | |
template<typename Counter > | |
void | shutdown (Counter &) |
void | shutdown (TLRefCount &c) |
template<typename Counter , size_t threadCount> | |
void | benchmark (size_t n) |
BENCHMARK (TLRefCountOneThread, n) | |
BENCHMARK (TLRefCountFourThreads, n) | |
template<typename RefCount > | |
void | basicTest () |
template<typename RefCount > | |
void | stressTest (size_t itersCount) |
TEST (TLRefCount, Basic) | |
TEST (TLRefCount, Stress) | |
template<std::size_t start = 0, std::size_t n = std::numeric_limits<std::size_t>::max(), class T , class Seq = typename TemplateTupleRange<T, start, n>::type> | |
auto | tupleRange (T &&v) -> decltype(detail::TupleSelect< Seq >::select(std::forward< T >(v))) |
template<class T , class U > | |
auto | tuplePrepend (T &&car, U &&cdr) -> decltype(std::tuple_cat(std::make_tuple(std::forward< T >(car)), std::forward< U >(cdr))) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (basic_fbstring< E, T, A, S > &&lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (const basic_fbstring< E, T, A, S > &lhs, basic_fbstring< E, T, A, S > &&rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (basic_fbstring< E, T, A, S > &&lhs, basic_fbstring< E, T, A, S > &&rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (const E *lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (const E *lhs, basic_fbstring< E, T, A, S > &&rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (E lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (E lhs, basic_fbstring< E, T, A, S > &&rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (const basic_fbstring< E, T, A, S > &lhs, const E *rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (basic_fbstring< E, T, A, S > &&lhs, const E *rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (const basic_fbstring< E, T, A, S > &lhs, E rhs) |
template<typename E , class T , class A , class S > | |
basic_fbstring< E, T, A, S > | operator+ (basic_fbstring< E, T, A, S > &&lhs, E rhs) |
template<typename E , class T , class A , class S > | |
bool | operator== (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator== (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator== (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs) |
template<typename E , class T , class A , class S > | |
bool | operator!= (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator!= (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator!= (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs) |
template<typename E , class T , class A , class S > | |
bool | operator< (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator< (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs) |
template<typename E , class T , class A , class S > | |
bool | operator< (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator> (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator> (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs) |
template<typename E , class T , class A , class S > | |
bool | operator> (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator<= (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator<= (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs) |
template<typename E , class T , class A , class S > | |
bool | operator<= (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator>= (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
bool | operator>= (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs) |
template<typename E , class T , class A , class S > | |
bool | operator>= (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
void | swap (basic_fbstring< E, T, A, S > &lhs, basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S > | |
std::basic_istream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > & | operator>> (std::basic_istream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > &is, basic_fbstring< E, T, A, S > &str) |
template<typename E , class T , class A , class S > | |
std::basic_ostream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > & | operator<< (std::basic_ostream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > &os, const basic_fbstring< E, T, A, S > &str) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator== (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator== (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator!= (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator!= (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator< (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator> (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator< (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator> (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator<= (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator>= (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator<= (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<typename E , class T , class A , class S , class A2 > | |
bool | operator>= (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs) |
template<class T , class R , class A , class S > | |
FOLLY_ASSUME_RELOCATABLE (basic_fbstring< T, R, A, S >) | |
template<class T , class A > | |
void | swap (fbvector< T, A > &lhs, fbvector< T, A > &rhs) noexcept |
template<class T , class A > | |
void | compactResize (fbvector< T, A > *v, size_t sz) |
template<class T , class A > | |
T * | relinquish (fbvector< T, A > &v) |
template<class T , class A > | |
void | attach (fbvector< T, A > &v, T *data, size_t sz, size_t cap) |
void | swap (File &a, File &b) noexcept |
int | openNoInt (const char *name, int flags, mode_t mode) |
static int | filterCloseReturn (int r) |
int | closeNoInt (int fd) |
int | closeNoInt (NetworkSocket fd) |
int | fsyncNoInt (int fd) |
int | dupNoInt (int fd) |
int | dup2NoInt (int oldfd, int newfd) |
int | fdatasyncNoInt (int fd) |
int | ftruncateNoInt (int fd, off_t len) |
int | truncateNoInt (const char *path, off_t len) |
int | flockNoInt (int fd, int operation) |
int | shutdownNoInt (NetworkSocket fd, int how) |
ssize_t | readNoInt (int fd, void *buf, size_t count) |
ssize_t | preadNoInt (int fd, void *buf, size_t count, off_t offset) |
ssize_t | readvNoInt (int fd, const iovec *iov, int count) |
ssize_t | writeNoInt (int fd, const void *buf, size_t count) |
ssize_t | pwriteNoInt (int fd, const void *buf, size_t count, off_t offset) |
ssize_t | writevNoInt (int fd, const iovec *iov, int count) |
ssize_t | readFull (int fd, void *buf, size_t count) |
ssize_t | preadFull (int fd, void *buf, size_t count, off_t offset) |
ssize_t | writeFull (int fd, const void *buf, size_t count) |
ssize_t | pwriteFull (int fd, const void *buf, size_t count, off_t offset) |
ssize_t | readvFull (int fd, iovec *iov, int count) |
ssize_t | preadvFull (int fd, iovec *iov, int count, off_t offset) |
ssize_t | writevFull (int fd, iovec *iov, int count) |
ssize_t | pwritevFull (int fd, iovec *iov, int count, off_t offset) |
int | writeFileAtomicNoThrow (StringPiece filename, iovec *iov, int count, mode_t permissions) |
void | writeFileAtomic (StringPiece filename, iovec *iov, int count, mode_t permissions) |
void | writeFileAtomic (StringPiece filename, ByteRange data, mode_t permissions) |
void | writeFileAtomic (StringPiece filename, StringPiece data, mode_t permissions) |
int | shutdownNoInt (int fd, int how) |
template<class Container > | |
bool | readFile (int fd, Container &out, size_t num_bytes=std::numeric_limits< size_t >::max()) |
template<class Container > | |
bool | readFile (const char *file_name, Container &out, size_t num_bytes=std::numeric_limits< size_t >::max()) |
template<class Container > | |
bool | writeFile (const Container &data, const char *filename, int flags=O_WRONLY|O_CREAT|O_TRUNC, mode_t mode=0666) |
uint64_t | fingerprint64 (StringPiece str) |
void | fingerprint96 (StringPiece str, uint64_t *msb, uint32_t *lsb) |
void | fingerprint128 (StringPiece str, uint64_t *msb, uint64_t *lsb) |
std::uint32_t | hsieh_hash32_buf (const void *buf, std::size_t len) |
template<class C , std::size_t N> | |
std::basic_ostream< C > & | operator<< (std::basic_ostream< C > &os, const BasicFixedString< C, N > &string) |
template<class Char , std::size_t A, std::size_t B> | |
constexpr bool | operator== (const BasicFixedString< Char, A > &a, const BasicFixedString< Char, B > &b) noexcept |
template<class Char , std::size_t A, std::size_t B> | |
constexpr bool | operator!= (const BasicFixedString< Char, A > &a, const BasicFixedString< Char, B > &b) |
template<class Char , std::size_t A, std::size_t B> | |
constexpr bool | operator< (const BasicFixedString< Char, A > &a, const BasicFixedString< Char, B > &b) noexcept |
template<class Char , std::size_t A, std::size_t B> | |
constexpr bool | operator> (const BasicFixedString< Char, A > &a, const BasicFixedString< Char, B > &b) noexcept |
template<class Char , std::size_t A, std::size_t B> | |
constexpr bool | operator<= (const BasicFixedString< Char, A > &a, const BasicFixedString< Char, B > &b) noexcept |
template<class Char , std::size_t A, std::size_t B> | |
constexpr bool | operator>= (const BasicFixedString< Char, A > &a, const BasicFixedString< Char, B > &b) noexcept |
template<class Char , std::size_t N, std::size_t M> | |
constexpr BasicFixedString< Char, N+M > | operator+ (const BasicFixedString< Char, N > &a, const BasicFixedString< Char, M > &b) noexcept |
template<class Char , std::size_t N> | |
constexpr BasicFixedString< Char, N-1u > | makeFixedString (const Char(&a)[N]) noexcept |
template<class Char , std::size_t N> | |
FOLLY_CPP14_CONSTEXPR void | swap (BasicFixedString< Char, N > &a, BasicFixedString< Char, N > &b) noexcept |
template<class Derived , bool containerMode, class... Args> | |
void | writeTo (FILE *fp, const BaseFormatter< Derived, containerMode, Args... > &formatter) |
template<class... Args> | |
Formatter< false, Args... > | format (StringPiece fmt, Args &&...args) |
template<class C > | |
Formatter< true, C > | vformat (StringPiece fmt, C &&container) |
template<bool containerMode, class... Args> | |
std::ostream & | operator<< (std::ostream &out, const Formatter< containerMode, Args... > &formatter) |
template<class... Args> | |
std::string | sformat (StringPiece fmt, Args &&...args) |
template<class Container > | |
Formatter< true, Container > | vformat (StringPiece fmt, Container &&container) |
template<class Container > | |
std::string | svformat (StringPiece fmt, Container &&container) |
template<class Container , class Value > | |
detail::DefaultValueWrapper< Container, Value > | defaulted (const Container &c, const Value &v) |
template<class Str , class... Args> | |
std::enable_if< IsSomeString< Str >::value >::type | format (Str *out, StringPiece fmt, Args &&...args) |
template<class Str , class Container > | |
std::enable_if< IsSomeString< Str >::value >::type | vformat (Str *out, StringPiece fmt, Container &&container) |
template<class... Args> | |
Formatter< false, Args... > | formatChecked (StringPiece fmt, Args &&...args) |
template<class... Args> | |
std::string | sformatChecked (StringPiece fmt, Args &&...args) |
template<class Container > | |
Formatter< true, Container > | vformatChecked (StringPiece fmt, Container &&container) |
template<class Container > | |
std::string | svformatChecked (StringPiece fmt, Container &&container) |
template<class Str , class... Args> | |
std::enable_if< IsSomeString< Str >::value >::type | formatChecked (Str *out, StringPiece fmt, Args &&...args) |
template<class Str , class Container > | |
std::enable_if< IsSomeString< Str >::value >::type | vformatChecked (Str *out, StringPiece fmt, Container &&container) |
template<typename ReturnType , typename... Args> | |
Function< ReturnType(Args...) const > | constCastFunction (Function< ReturnType(Args...)> &&) noexcept |
template<typename FunctionType > | |
void | swap (Function< FunctionType > &lhs, Function< FunctionType > &rhs) noexcept |
template<typename FunctionType > | |
bool | operator== (const Function< FunctionType > &fn, std::nullptr_t) |
template<typename FunctionType > | |
bool | operator== (std::nullptr_t, const Function< FunctionType > &fn) |
template<typename FunctionType > | |
bool | operator!= (const Function< FunctionType > &fn, std::nullptr_t) |
template<typename FunctionType > | |
bool | operator!= (std::nullptr_t, const Function< FunctionType > &fn) |
template<typename ReturnType , typename... Args> | |
Function< ReturnType(Args...) const > | constCastFunction (Function< ReturnType(Args...) const > &&that) noexcept |
template<typename F , typename Tuple > | |
decltype(auto) constexpr | apply (F &&func, Tuple &&tuple) |
template<typename Tuple > | |
auto | forward_tuple (Tuple &&tuple) noexcept-> decltype(detail::apply_tuple::adl::forward_tuple(std::declval< Tuple >(), std::declval< index_sequence_for_tuple< std::remove_reference_t< Tuple >>>())) |
template<class F > | |
auto | uncurry (F &&f) -> detail::apply_tuple::Uncurry< typename std::decay< F >::type > |
template<class T , class Tuple > | |
constexpr T | make_from_tuple (Tuple &&t) |
template<typename F , typename... Args> | |
constexpr auto | invoke (F &&f, Args &&...args) noexcept(noexcept(static_cast< F && >(f)(static_cast< Args && >(args)...))) -> decltype(static_cast< F && >(f)(static_cast< Args && >(args)...)) |
template<typename M , typename C , typename... Args> | |
constexpr auto | invoke (M(C::*d), Args &&...args) -> decltype(std::mem_fn(d)(static_cast< Args && >(args)...)) |
template<typename F , typename... Args> | |
auto | partial (F &&f, Args &&...args) -> detail::partial::Partial< typename std::decay< F >::type, std::tuple< typename std::decay< Args >::type... >> |
template<class T > | |
SemiFuture< typename std::decay< T >::type > | makeSemiFuture (T &&t) |
template<class F > | |
std::enable_if< isFutureOrSemiFuture< invoke_result_t< F > >::value, SemiFuture< typename invoke_result_t< F >::value_type > >::type | makeSemiFutureWith (F &&func) |
template<class F > | |
std::enable_if< !(isFutureOrSemiFuture< invoke_result_t< F >>::value), SemiFuture< lift_unit_t< invoke_result_t< F > > > >::type | makeSemiFutureWith (F &&func) |
template<class T > | |
SemiFuture< T > | makeSemiFuture (std::exception_ptr const &e) |
template<class T > | |
SemiFuture< T > | makeSemiFuture (exception_wrapper ew) |
Make a failed SemiFuture from an exception_wrapper. More... | |
template<class T , class E > | |
std::enable_if< std::is_base_of< std::exception, E >::value, SemiFuture< T > >::type | makeSemiFuture (E const &e) |
template<class T > | |
SemiFuture< T > | makeSemiFuture (Try< T > t) |
SemiFuture< Unit > | makeSemiFuture () |
template<class Func > | |
auto | via (Executor *x, Func &&func) -> Future< typename isFutureOrSemiFuture< decltype(std::declval< Func >()())>::Inner > |
template<class Func > | |
auto | via (Executor::KeepAlive<> x, Func &&func) -> Future< typename isFutureOrSemiFuture< decltype(std::declval< Func >()())>::Inner > |
template<class T > | |
Future< typename std::decay< T >::type > | makeFuture (T &&t) |
Future< Unit > | makeFuture () |
template<class F > | |
std::enable_if< isFuture< invoke_result_t< F > >::value, invoke_result_t< F > >::type | makeFutureWith (F &&func) |
template<class F > | |
std::enable_if< !(isFuture< invoke_result_t< F >>::value), Future< lift_unit_t< invoke_result_t< F > > > >::type | makeFutureWith (F &&func) |
template<class T > | |
Future< T > | makeFuture (std::exception_ptr const &e) |
template<class T > | |
Future< T > | makeFuture (exception_wrapper ew) |
template<class T , class E > | |
std::enable_if< std::is_base_of< std::exception, E >::value, Future< T > >::type | makeFuture (E const &e) |
template<class T > | |
Future< T > | makeFuture (Try< T > t) |
Future< Unit > | via (Executor *executor, int8_t priority) |
Future< Unit > | via (Executor::KeepAlive<> executor, int8_t priority) |
template<typename... Fs> | |
SemiFuture< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > | collectAllSemiFuture (Fs &&...fs) |
template<typename... Fs> | |
Future< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > | collectAll (Fs &&...fs) |
template<class InputIterator > | |
SemiFuture< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > | collectAllSemiFuture (InputIterator first, InputIterator last) |
template<class InputIterator > | |
Future< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > | collectAll (InputIterator first, InputIterator last) |
template<class InputIterator > | |
Future< std::vector< typename std::iterator_traits< InputIterator >::value_type::value_type > > | collect (InputIterator first, InputIterator last) |
template<typename... Fs> | |
Future< std::tuple< typename remove_cvref_t< Fs >::value_type... > > | collect (Fs &&...fs) |
template<class InputIterator > | |
Future< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > | collectAny (InputIterator first, InputIterator last) |
template<class InputIterator > | |
SemiFuture< std::pair< size_t, typename std::iterator_traits< InputIterator >::value_type::value_type > > | collectAnyWithoutException (InputIterator first, InputIterator last) |
template<class InputIterator > | |
SemiFuture< std::vector< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > > | collectN (InputIterator first, InputIterator last, size_t n) |
template<class It , class T , class F > | |
Future< T > | reduce (It first, It last, T &&initial, F &&func) |
template<class Collection , class F , class ItT , class Result > | |
std::vector< Future< Result > > | window (Collection input, F func, size_t n) |
template<class F > | |
auto | window (size_t times, F func, size_t n) -> std::vector< invoke_result_t< F, size_t >> |
template<class Collection , class F , class ItT , class Result > | |
std::vector< Future< Result > > | window (Executor *executor, Collection input, F func, size_t n) |
template<class Collection , class F , class ItT , class Result > | |
std::vector< Future< Result > > | window (Executor::KeepAlive<> executor, Collection input, F func, size_t n) |
template<class It , class T , class F > | |
Future< T > | unorderedReduce (It first, It last, T initial, F func) |
template<class F > | |
Future< Unit > | when (bool p, F &&thunk) |
template<class P , class F > | |
Future< Unit > | whileDo (P &&predicate, F &&thunk) |
template<class F > | |
Future< Unit > | times (const int n, F &&thunk) |
template<class T > | |
std::pair< Promise< T >, SemiFuture< T > > | makePromiseContract () |
template<class T > | |
std::pair< Promise< T >, Future< T > > | makePromiseContract (Executor *e) |
template<class T > | |
FutureSplitter< T > | splitFuture (Future< T > &&future) |
template<class F > | |
std::enable_if< !(isFutureOrSemiFuture< invoke_result_t< F >>::value), SemiFuture< typename lift_unit< invoke_result_t< F > >::type > >::type | makeSemiFutureWith (F &&func) |
template<class F > | |
std::enable_if< !(isFuture< invoke_result_t< F >>::value), Future< typename lift_unit< invoke_result_t< F > >::type > >::type | makeFutureWith (F &&func) |
template<class Collection > | |
auto | collectAllSemiFuture (Collection &&c) -> decltype(collectAllSemiFuture(c.begin(), c.end())) |
Sugar for the most common case. More... | |
template<class Collection > | |
auto | collectAll (Collection &&c) -> decltype(collectAll(c.begin(), c.end())) |
template<class Collection > | |
auto | collect (Collection &&c) -> decltype(collect(c.begin(), c.end())) |
Sugar for the most common case. More... | |
template<class Collection > | |
auto | collectAny (Collection &&c) -> decltype(collectAny(c.begin(), c.end())) |
Sugar for the most common case. More... | |
template<class Collection > | |
auto | collectAnyWithoutException (Collection &&c) -> decltype(collectAnyWithoutException(c.begin(), c.end())) |
Sugar for the most common case. More... | |
template<class Collection > | |
auto | collectN (Collection &&c, size_t n) -> decltype(collectN(c.begin(), c.end(), n)) |
Sugar for the most common case. More... | |
template<class Collection , class T , class F > | |
auto | reduce (Collection &&c, T &&initial, F &&func) -> decltype(reduce(c.begin(), c.end(), std::forward< T >(initial), std::forward< F >(func))) |
Sugar for the most common case. More... | |
template<class Collection , class T , class F > | |
auto | unorderedReduce (Collection &&c, T &&initial, F &&func) -> decltype(unorderedReduce(c.begin(), c.end(), std::forward< T >(initial), std::forward< F >(func))) |
Sugar for the most common case. More... | |
template<class T > | |
Future< T > | someFuture () |
template<class Ret , class... Params> | |
std::enable_if< isFuture< Ret >::value, Ret >::type | aFunction (Params...) |
template<class Ret , class... Params> | |
std::enable_if<!isFuture< Ret >::value, Ret >::type | aFunction (Params...) |
template<class Ret , class... Params> | |
std::function< Ret(Params...)> | aStdFunction (typename std::enable_if<!isFuture< Ret >::value, bool >::type=false) |
template<class Ret , class... Params> | |
std::function< Ret(Params...)> | aStdFunction (typename std::enable_if< isFuture< Ret >::value, bool >::type=true) |
uint32_t | crc32c (const uint8_t *data, size_t nbytes, uint32_t startingChecksum) |
uint32_t | crc32 (const uint8_t *data, size_t nbytes, uint32_t startingChecksum) |
uint32_t | crc32_type (const uint8_t *data, size_t nbytes, uint32_t startingChecksum) |
uint32_t | crc32_combine (uint32_t crc1, uint32_t crc2, size_t crc2len) |
uint32_t | crc32c_combine (uint32_t crc1, uint32_t crc2, size_t crc2len) |
static constexpr uint32_t | gf_multiply_sw_1 (size_t i, uint32_t p, uint32_t a, uint32_t b, uint32_t m) |
static constexpr uint32_t | gf_multiply_sw (uint32_t a, uint32_t b, uint32_t m) |
static constexpr uint32_t | gf_square_sw (uint32_t a, uint32_t m) |
static uint32_t | gf_multiply_crc32c_hw (uint64_t, uint64_t, uint32_t) |
static uint32_t | gf_multiply_crc32_hw (uint64_t, uint64_t, uint32_t) |
template<typename F > | |
static uint32_t | crc32_append_zeroes (F mult, uint32_t crc, size_t len, uint32_t polynomial, std::array< uint32_t, 62 > const &powers_array) |
void | init (int *argc, char ***argv, bool removeFlags) |
int | setCloseOnExec (int fd, int value) |
std::ostream & | operator<< (std::ostream &os, const AsyncSocket::StateEnum &state) |
WriteFlags | operator| (WriteFlags a, WriteFlags b) |
WriteFlags & | operator|= (WriteFlags &a, WriteFlags b) |
WriteFlags | operator& (WriteFlags a, WriteFlags b) |
WriteFlags & | operator&= (WriteFlags &a, WriteFlags b) |
WriteFlags | operator~ (WriteFlags a) |
WriteFlags | unSet (WriteFlags a, WriteFlags b) |
bool | isSet (WriteFlags a, WriteFlags b) |
bool | operator== (const DelayedDestructionBase::DestructorGuard &left, const DelayedDestructionBase::DestructorGuard &right) |
bool | operator!= (const DelayedDestructionBase::DestructorGuard &left, const DelayedDestructionBase::DestructorGuard &right) |
bool | operator== (const DelayedDestructionBase::DestructorGuard &left, std::nullptr_t) |
bool | operator== (std::nullptr_t, const DelayedDestructionBase::DestructorGuard &right) |
bool | operator!= (const DelayedDestructionBase::DestructorGuard &left, std::nullptr_t) |
bool | operator!= (std::nullptr_t, const DelayedDestructionBase::DestructorGuard &right) |
template<typename LeftAliasType , typename RightAliasType > | |
bool | operator== (const DelayedDestructionBase::IntrusivePtr< LeftAliasType > &left, const DelayedDestructionBase::IntrusivePtr< RightAliasType > &right) |
template<typename LeftAliasType , typename RightAliasType > | |
bool | operator!= (const DelayedDestructionBase::IntrusivePtr< LeftAliasType > &left, const DelayedDestructionBase::IntrusivePtr< RightAliasType > &right) |
template<typename LeftAliasType > | |
bool | operator== (const DelayedDestructionBase::IntrusivePtr< LeftAliasType > &left, std::nullptr_t) |
template<typename RightAliasType > | |
bool | operator== (std::nullptr_t, const DelayedDestructionBase::IntrusivePtr< RightAliasType > &right) |
template<typename LeftAliasType > | |
bool | operator!= (const DelayedDestructionBase::IntrusivePtr< LeftAliasType > &left, std::nullptr_t) |
template<typename RightAliasType > | |
bool | operator!= (std::nullptr_t, const DelayedDestructionBase::IntrusivePtr< RightAliasType > &right) |
static std::chrono::milliseconds | getTimeDelta (std::chrono::steady_clock::time_point *prev) |
std::atomic< EventBaseManager * > | globalManager (nullptr) |
auto | event_ref_flags (struct event *ev) -> decltype(std::ref(ev->ev_flags)) |
auto | event_ref_flags (struct event const *ev) -> decltype(std::cref(ev->ev_flags)) |
static void | run (EventBaseManager *ebm, EventBase *eb, folly::Baton<> *stop, const StringPiece &name) |
std::ostream & | operator<< (std::ostream &os, const PasswordCollector &collector) |
TEST (AsyncSocketException, SimpleTest) | |
TEST (AsyncSocketException, SSLExceptionType) | |
TEST (AsyncSocketTest, getSockOpt) | |
TEST (AsyncSocketTest, REUSEPORT) | |
TEST (AsyncSocketTest, v4v6samePort) | |
TEST (AsyncSocketTest, duplicateBind) | |
TEST (AsyncSocketTest, tosReflect) | |
void | getfds (int fds[2]) |
void | getctx (std::shared_ptr< folly::SSLContext > clientCtx, std::shared_ptr< folly::SSLContext > serverCtx) |
void | sslsocketpair (EventBase *eventBase, AsyncSSLSocket::UniquePtr *clientSock, AsyncSSLSocket::UniquePtr *serverSock) |
bool | clientProtoFilterPickPony (unsigned char **client, unsigned int *client_len, const unsigned char *, unsigned int) |
bool | clientProtoFilterPickNone (unsigned char **, unsigned int *, const unsigned char *, unsigned int) |
std::string | getFileAsBuf (const char *fileName) |
TEST (AsyncSSLSocketTest, ConnectWriteReadClose) | |
TEST (AsyncSSLSocketTest, ReadAfterClose) | |
TEST (AsyncSSLSocketTest, Renegotiate) | |
TEST (AsyncSSLSocketTest, HandshakeError) | |
TEST (AsyncSSLSocketTest, ReadError) | |
TEST (AsyncSSLSocketTest, WriteError) | |
TEST (AsyncSSLSocketTest, SocketWithDelay) | |
TEST (AsyncSSLSocketTest, SNITestMatch) | |
TEST (AsyncSSLSocketTest, SNITestNotMatch) | |
TEST (AsyncSSLSocketTest, SNITestChangeServerName) | |
TEST (AsyncSSLSocketTest, SNITestClientHelloNoHostname) | |
TEST (AsyncSSLSocketTest, SSLClientTest) | |
TEST (AsyncSSLSocketTest, SSLClientTestReuse) | |
TEST (AsyncSSLSocketTest, SSLClientTimeoutTest) | |
TEST (AsyncSSLSocketTest, SSLParseClientHelloSuccess) | |
TEST (AsyncSSLSocketTest, GetClientCertificate) | |
TEST (AsyncSSLSocketTest, SSLParseClientHelloOnePacket) | |
TEST (AsyncSSLSocketTest, SSLParseClientHelloTwoPackets) | |
TEST (AsyncSSLSocketTest, SSLParseClientHelloMultiplePackets) | |
TEST (AsyncSSLSocketTest, SSLHandshakeValidationSuccess) | |
TEST (AsyncSSLSocketTest, SSLHandshakeValidationFailure) | |
TEST (AsyncSSLSocketTest, OverrideSSLCtxDisableVerify) | |
TEST (AsyncSSLSocketTest, OverrideSSLCtxEnableVerify) | |
TEST (AsyncSSLSocketTest, SSLHandshakeValidationOverride) | |
TEST (AsyncSSLSocketTest, SSLHandshakeValidationSkip) | |
TEST (AsyncSSLSocketTest, ClientCertHandshakeSuccess) | |
TEST (AsyncSSLSocketTest, NoClientCertHandshakeError) | |
TEST (AsyncSSLSocketTest, LoadCertFromMemory) | |
TEST (AsyncSSLSocketTest, MinWriteSizeTest) | |
TEST (AsyncSSLSocketTest, UnencryptedTest) | |
TEST (AsyncSSLSocketTest, ConnectUnencryptedTest) | |
TEST (AsyncSSLSocketTest, SSLAcceptRunnerBasic) | |
TEST (AsyncSSLSocketTest, SSLAcceptRunnerAcceptError) | |
TEST (AsyncSSLSocketTest, SSLAcceptRunnerAcceptClose) | |
TEST (AsyncSSLSocketTest, SSLAcceptRunnerAcceptDestroy) | |
TEST (AsyncSSLSocketTest, ConnResetErrorString) | |
TEST (AsyncSSLSocketTest, ConnEOFErrorString) | |
TEST (AsyncSSLSocketTest, ConnOpenSSLErrorString) | |
TEST (AsyncSSLSocketTest, TestSSLCipherCodeToNameMap) | |
TEST (AsyncSSLSocketTest2, AttachDetachSSLContext) | |
TEST (AsyncSSLSocketTest2, TestTLS12DefaultClient) | |
TEST (AsyncSSLSocketTest2, TestTLS12BadClient) | |
TEST_F (AsyncSSLSocketWriteTest, write_coalescing1) | |
TEST_F (AsyncSSLSocketWriteTest, write_coalescing2) | |
TEST_F (AsyncSSLSocketWriteTest, write_coalescing3) | |
TEST_F (AsyncSSLSocketWriteTest, write_coalescing4) | |
TEST_F (AsyncSSLSocketWriteTest, write_coalescing5) | |
TEST_F (AsyncSSLSocketWriteTest, write_coalescing6) | |
TEST_F (AsyncSSLSocketWriteTest, write_with_eor1) | |
TEST_F (AsyncSSLSocketWriteTest, write_with_eor2) | |
TEST_F (AsyncSSLSocketWriteTest, write_with_eor3) | |
TEST (AsyncTimeout, make) | |
TEST (AsyncTimeout, schedule) | |
TEST (AsyncTimeout, schedule_immediate) | |
TEST (AsyncTimeout, cancel_make) | |
TEST (AsyncTimeout, cancel_schedule) | |
TEST (AsyncTransportTest, getSocketFromSocket) | |
TEST (AsyncTransportTest, getSocketFromWrappedTransport) | |
void | setupSSLLocks () |
TEST (SSLContextInitializationTest, SSLContextInitializeThenSetLocksAndInit) | |
TEST (SSLContextInitializationTest, SSLContextSetLocksAndInitialize) | |
TEST (SSLContextInitializationTest, SSLContextLocks) | |
TEST (SSLContextInitializationTest, SSLContextLocksSetAfterInitIgnored) | |
TEST_F (SSLContextTest, TestSetCipherString) | |
TEST_F (SSLContextTest, TestSetCipherList) | |
TEST_F (SSLContextTest, TestLoadCertKey) | |
TEST_F (SSLOptionsTest, TestSetCommonCipherList) | |
TEST_F (SSLSessionTest, BasicTest) | |
TEST_F (SSLSessionTest, SerializeDeserializeTest) | |
TEST_F (SSLSessionTest, GetSessionID) | |
static int | getLinuxVersion (StringPiece release) |
static nanoseconds | getSchedTimeWaiting (pid_t tid) |
std::ostream & | operator<< (std::ostream &os, const TimePoint &timePoint) |
bool | checkTimeout (const TimePoint &start, const TimePoint &end, nanoseconds expected, bool allowSmaller, nanoseconds tolerance) |
bool | checkTimeout (const TimePoint &start, const TimePoint &end, std::chrono::nanoseconds expected, bool allowSmaller, std::chrono::nanoseconds tolerance=std::chrono::milliseconds(5)) |
TEST (WriteFlagsTest, isSet) | |
TEST (WriteFlagsTest, unionOperator) | |
TEST (WriteFlagsTest, intersectionOperator) | |
TEST (WriteFlagsTest, exclusionOperator) | |
TEST (WriteFlagsTest, unsetOperator) | |
TEST (WriteFlagsTest, compoundAssignmentUnionOperator) | |
TEST (WriteFlagsTest, compoundAssignmentIntersectionOperator) | |
std::shared_ptr< ShutdownSocketSet > | tryGetShutdownSocketSet () |
ReadMostlySharedPtr< ShutdownSocketSet > | tryGetShutdownSocketSetFast () |
size_t | hash_value (const IPAddress &addr) |
ostream & | operator<< (ostream &os, const IPAddress &addr) |
void | toAppend (IPAddress addr, string *result) |
void | toAppend (IPAddress addr, fbstring *result) |
bool | operator== (const IPAddress &addr1, const IPAddress &addr2) |
bool | operator< (const IPAddress &addr1, const IPAddress &addr2) |
size_t | hash_value (const IPAddressV4 &addr) |
ostream & | operator<< (ostream &os, const IPAddressV4 &addr) |
void | toAppend (IPAddressV4 addr, string *result) |
void | toAppend (IPAddressV4 addr, fbstring *result) |
bool | operator== (const IPAddressV4 &addr1, const IPAddressV4 &addr2) |
bool | operator< (const IPAddressV4 &addr1, const IPAddressV4 &addr2) |
bool | operator!= (const IPAddressV4 &a, const IPAddressV4 &b) |
bool | operator> (const IPAddressV4 &a, const IPAddressV4 &b) |
bool | operator<= (const IPAddressV4 &a, const IPAddressV4 &b) |
bool | operator>= (const IPAddressV4 &a, const IPAddressV4 &b) |
size_t | hash_value (const IPAddressV6 &addr) |
ostream & | operator<< (ostream &os, const IPAddressV6 &addr) |
void | toAppend (IPAddressV6 addr, string *result) |
void | toAppend (IPAddressV6 addr, fbstring *result) |
static uint16_t | unpack (uint8_t lobyte, uint8_t hibyte) |
static void | unpackInto (const unsigned char *src, uint16_t *dest, size_t count) |
dynamic | parseJson (StringPiece range) |
dynamic | parseJson (StringPiece range, json::serialization_opts const &opts) |
std::string | toJson (dynamic const &dyn) |
std::string | toPrettyJson (dynamic const &dyn) |
void | PrintTo (const dynamic &dyn, std::ostream *os) |
FOLLY_ALWAYS_INLINE void | assume (bool cond) |
FOLLY_ALWAYS_INLINE void | assume_unreachable () |
template<typename T > | |
constexpr unsigned int | findFirstSet (T const v) |
template<typename T > | |
constexpr unsigned int | findLastSet (T const v) |
template<typename T > | |
constexpr unsigned int | popcount (T const v) |
template<class T > | |
constexpr T | nextPowTwo (T const v) |
template<class T > | |
constexpr T | prevPowTwo (T const v) |
template<class T > | |
constexpr bool | isPowTwo (T const v) |
template<class T > | |
FOLLY_PACK_POP T | loadUnaligned (const void *p) |
template<class T > | |
T | partialLoadUnaligned (const void *p, size_t l) |
template<class T > | |
void | storeUnaligned (void *p, T value) |
template<typename T > | |
T | bitReverse (T n) |
template<typename Ex > | |
FOLLY_NOINLINE FOLLY_COLD void | throw_exception (Ex &&ex) |
template<typename Ex > | |
FOLLY_NOINLINE FOLLY_COLD void | terminate_with (Ex &&ex) noexcept |
template<typename Ex , typename... Args> | |
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void | throw_exception (Args &&...args) |
template<typename Ex , typename... Args> | |
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void | terminate_with (Args &&...args) noexcept |
template<typename F , typename... A> | |
FOLLY_NOINLINE FOLLY_COLD void | invoke_noreturn_cold (F &&f, A &&...a) |
template<typename T > | |
FOLLY_NODISCARD T * | launder (T *in) noexcept |
void | launder (void *)=delete |
void | launder (void const *)=delete |
void | launder (void volatile *)=delete |
void | launder (void const volatile *)=delete |
template<typename T , typename... Args> | |
void | launder (T(*)(Args...))=delete |
template<typename T > | |
constexpr ordering | to_ordering (T c) |
template<typename Pointer > | |
constexpr Pointer & | get_underlying (propagate_const< Pointer > &obj) |
template<typename Pointer > | |
constexpr Pointer const & | get_underlying (propagate_const< Pointer > const &obj) |
template<typename Pointer > | |
FOLLY_CPP14_CONSTEXPR void | swap (propagate_const< Pointer > &a, propagate_const< Pointer > &b) noexcept(noexcept(a.swap(b))) |
template<typename Pointer > | |
constexpr bool | operator== (propagate_const< Pointer > const &a, std::nullptr_t) |
template<typename Pointer > | |
constexpr bool | operator== (std::nullptr_t, propagate_const< Pointer > const &a) |
template<typename Pointer > | |
constexpr bool | operator!= (propagate_const< Pointer > const &a, std::nullptr_t) |
template<typename Pointer > | |
constexpr bool | operator!= (std::nullptr_t, propagate_const< Pointer > const &a) |
template<typename Pointer > | |
constexpr bool | operator== (propagate_const< Pointer > const &a, propagate_const< Pointer > const &b) |
template<typename Pointer > | |
constexpr bool | operator!= (propagate_const< Pointer > const &a, propagate_const< Pointer > const &b) |
template<typename Pointer > | |
constexpr bool | operator< (propagate_const< Pointer > const &a, propagate_const< Pointer > const &b) |
template<typename Pointer > | |
constexpr bool | operator<= (propagate_const< Pointer > const &a, propagate_const< Pointer > const &b) |
template<typename Pointer > | |
constexpr bool | operator> (propagate_const< Pointer > const &a, propagate_const< Pointer > const &b) |
template<typename Pointer > | |
constexpr bool | operator>= (propagate_const< Pointer > const &a, propagate_const< Pointer > const &b) |
template<typename Pointer , typename Other > | |
constexpr auto | operator== (propagate_const< Pointer > const &a, Other const &b) -> decltype(get_underlying(a)==b, false) |
template<typename Pointer , typename Other > | |
constexpr auto | operator!= (propagate_const< Pointer > const &a, Other const &b) -> decltype(get_underlying(a)!=b, false) |
template<typename Pointer , typename Other > | |
constexpr auto | operator< (propagate_const< Pointer > const &a, Other const &b) -> decltype(get_underlying(a)< b, false) |
template<typename Pointer , typename Other > | |
constexpr auto | operator<= (propagate_const< Pointer > const &a, Other const &b) -> decltype(get_underlying(a)<=b, false) |
template<typename Pointer , typename Other > | |
constexpr auto | operator> (propagate_const< Pointer > const &a, Other const &b) -> decltype(get_underlying(a) > b, false) |
template<typename Pointer , typename Other > | |
constexpr auto | operator>= (propagate_const< Pointer > const &a, Other const &b) -> decltype(get_underlying(a) >=b, false) |
template<typename Other , typename Pointer > | |
constexpr auto | operator== (Other const &a, propagate_const< Pointer > const &b) -> decltype(a==get_underlying(b), false) |
template<typename Other , typename Pointer > | |
constexpr auto | operator!= (Other const &a, propagate_const< Pointer > const &b) -> decltype(a!=get_underlying(b), false) |
template<typename Other , typename Pointer > | |
constexpr auto | operator< (Other const &a, propagate_const< Pointer > const &b) -> decltype(a< get_underlying(b), false) |
template<typename Other , typename Pointer > | |
constexpr auto | operator<= (Other const &a, propagate_const< Pointer > const &b) -> decltype(a<=get_underlying(b), false) |
template<typename Other , typename Pointer > | |
constexpr auto | operator> (Other const &a, propagate_const< Pointer > const &b) -> decltype(a > get_underlying(b), false) |
template<typename Other , typename Pointer > | |
constexpr auto | operator>= (Other const &a, propagate_const< Pointer > const &b) -> decltype(a >=get_underlying(b), false) |
template<typename T > | |
rvalue_reference_wrapper< T > | rref (T &&value) noexcept |
template<typename T > | |
rvalue_reference_wrapper< T > | rref (T &) noexcept=delete |
int | uncaught_exceptions () noexcept |
template<class Func > | |
auto | lazy (Func &&fun) |
void | initLogging (StringPiece configString) |
void | initLoggingOrDie (StringPiece configString) |
const char * | getBaseLoggingConfig () |
LogConfig | parseLogConfig (StringPiece value) |
LogConfig | parseLogConfigJson (StringPiece value) |
LogConfig | parseLogConfigDynamic (const dynamic &value) |
dynamic | logConfigToDynamic (const LogConfig &config) |
dynamic | logConfigToDynamic (const LogHandlerConfig &config) |
dynamic | logConfigToDynamic (const LogCategoryConfig &config) |
FOLLY_ATTR_WEAK void | initializeLoggerDB (LoggerDB &db) |
LogLevel | stringToLogLevel (StringPiece name) |
string | logLevelToString (LogLevel level) |
std::ostream & | operator<< (std::ostream &os, LogLevel level) |
constexpr LogLevel | operator+ (LogLevel level, uint32_t value) |
LogLevel & | operator+= (LogLevel &level, uint32_t value) |
constexpr LogLevel | operator- (LogLevel level, uint32_t value) |
LogLevel & | operator-= (LogLevel &level, uint32_t value) |
constexpr bool | isLogLevelFatal (LogLevel level) |
void | logDisabledHelper (std::true_type) noexcept |
void | logDisabledHelper (std::false_type) noexcept |
std::string | loggingFormatPrintf (const char *format,...) noexcept |
std::string | loggingFormatPrintf (FOLLY_PRINTF_FORMAT const char *format,...) noexcept FOLLY_PRINTF_FORMAT_ATTR(1 |
std::ostream & | operator<< (std::ostream &os, const LogConfig &config) |
std::ostream & | operator<< (std::ostream &os, const LogCategoryConfig &config) |
std::ostream & | operator<< (std::ostream &os, const LogHandlerConfig &config) |
void | PrintTo (const std::shared_ptr< LogHandler > &handler, std::ostream *os) |
StringPiece | getXlogCategoryNameForFile (StringPiece filename) |
constexpr bool | xlogIsDirSeparator (char c) |
constexpr const char * | xlogStripFilename (const char *filename, const char *prefixes) |
std::ostream & | operator<< (std::ostream &os, MacAddress address) |
template<class Tgt > | |
std::enable_if< IsSomeString< Tgt >::value >::type | toAppend (MacAddress address, Tgt *result) |
template<typename Map , typename Key > | |
Map::mapped_type | get_default (const Map &map, const Key &key) |
template<class Map , typename Key = typename Map::key_type, typename Value = typename Map::mapped_type, typename std::enable_if<!is_invocable< Value >::value >::type * = nullptr> | |
Map::mapped_type | get_default (const Map &map, const Key &key, Value &&dflt) |
template<class Map , typename Key = typename Map::key_type, typename Func , typename = typename std::enable_if< is_invocable_r<typename Map::mapped_type, Func>::value>::type> | |
Map::mapped_type | get_default (const Map &map, const Key &key, Func &&dflt) |
template<class E = std::out_of_range, class Map , typename Key = typename Map::key_type> | |
const Map::mapped_type & | get_or_throw (const Map &map, const Key &key, const std::string &exceptionStrPrefix=std::string()) |
template<class E = std::out_of_range, class Map , typename Key = typename Map::key_type> | |
Map::mapped_type & | get_or_throw (Map &map, const Key &key, const std::string &exceptionStrPrefix=std::string()) |
template<class Map , typename Key = typename Map::key_type> | |
folly::Optional< typename Map::mapped_type > | get_optional (const Map &map, const Key &key) |
template<class Map , typename Key = typename Map::key_type> | |
const Map::mapped_type & | get_ref_default (const Map &map, const Key &key, const typename Map::mapped_type &dflt) |
template<class Map , typename Key = typename Map::key_type> | |
const Map::mapped_type & | get_ref_default (const Map &map, const Key &key, typename Map::mapped_type &&dflt)=delete |
template<class Map , typename Key = typename Map::key_type> | |
const Map::mapped_type & | get_ref_default (const Map &map, const Key &key, const typename Map::mapped_type &&dflt)=delete |
template<class Map , typename Key = typename Map::key_type, typename Func , typename = typename std::enable_if< is_invocable_r<const typename Map::mapped_type&, Func>::value>::type, typename = typename std::enable_if< std::is_reference<invoke_result_t<Func>>::value>::type> | |
const Map::mapped_type & | get_ref_default (const Map &map, const Key &key, Func &&dflt) |
template<class Map , typename Key = typename Map::key_type> | |
const Map::mapped_type * | get_ptr (const Map &map, const Key &key) |
template<class Map , typename Key = typename Map::key_type> | |
Map::mapped_type * | get_ptr (Map &map, const Key &key) |
template<class Map , class Key1 , class Key2 , class... Keys> | |
auto | get_optional (const Map &map, const Key1 &key1, const Key2 &key2, const Keys &...keys) -> folly::Optional< typename detail::NestedMapType< Map, 2+sizeof...(Keys)>::type > |
template<class Map , class Key1 , class Key2 , class... Keys> | |
auto | get_ptr (const Map &map, const Key1 &key1, const Key2 &key2, const Keys &...keys) -> typename detail::NestedMapType< Map, 2+sizeof...(Keys)>::type const * |
template<class Map , class Key1 , class Key2 , class... Keys> | |
auto | get_ptr (Map &map, const Key1 &key1, const Key2 &key2, const Keys &...keys) -> typename detail::NestedMapType< Map, 2+sizeof...(Keys)>::type * |
template<class Map , class Key1 , class Key2 , class... KeysDefault, typename = typename std::enable_if<sizeof...(KeysDefault) != 0>::type> | |
auto | get_default (const Map &map, const Key1 &key1, const Key2 &key2, const KeysDefault &...keysDefault) -> typename detail::NestedMapType< Map, 1+sizeof...(KeysDefault)>::type |
template<class Map , class Key1 , class Key2 , class... KeysDefault, typename = typename std::enable_if<sizeof...(KeysDefault) != 0>::type, typename = typename std::enable_if<std::is_lvalue_reference< typename detail::DefaultType<KeysDefault...>::type>::value>::type> | |
auto | get_ref_default (const Map &map, const Key1 &key1, const Key2 &key2, KeysDefault &&...keysDefault) -> typename detail::NestedMapType< Map, 1+sizeof...(KeysDefault)>::typeconst & |
template<typename N , typename D > | |
constexpr detail::IdivResultType< N, D > | divFloor (N num, D denom) |
template<typename N , typename D > | |
constexpr detail::IdivResultType< N, D > | divCeil (N num, D denom) |
template<typename N , typename D > | |
constexpr detail::IdivResultType< N, D > | divTrunc (N num, D denom) |
template<typename N , typename D > | |
constexpr detail::IdivResultType< N, D > | divRoundAway (N num, D denom) |
template<typename T > | |
void | mallctlRead (const char *cmd, T *out) |
template<typename T > | |
void | mallctlWrite (const char *cmd, T in) |
template<typename T > | |
void | mallctlReadWrite (const char *cmd, T *out, T in) |
void | mallctlCall (const char *cmd) |
bool | usingJEMalloc () noexcept |
size_t | goodMallocSize (size_t minSize) noexcept |
void * | checkedMalloc (size_t size) |
void * | checkedCalloc (size_t n, size_t size) |
void * | checkedRealloc (void *ptr, size_t size) |
void * | smartRealloc (void *p, const size_t currentSize, const size_t currentCapacity, const size_t newCapacity) |
void | resizeWithoutInitialization (std::string &s, std::size_t n) |
template<typename T , typename = typename std::enable_if< std::is_trivially_destructible<T>::value && !std::is_same<T, bool>::value>::type> | |
void | resizeWithoutInitialization (std::vector< T > &v, std::size_t n) |
void * | allocateBytes (size_t n) |
void | deallocateBytes (void *p, size_t n) |
void * | aligned_malloc (size_t size, size_t align) |
void | aligned_free (void *aligned_ptr) |
template<typename Alloc , size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)> | |
std::allocator_traits< Alloc >::pointer | allocateOverAligned (Alloc const &alloc, size_t n) |
template<typename Alloc , size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)> | |
void | deallocateOverAligned (Alloc const &alloc, typename std::allocator_traits< Alloc >::pointer ptr, size_t n) |
template<typename Alloc , size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)> | |
size_t | allocationBytesForOverAligned (size_t n) |
template<typename T , typename... Args> | |
std::enable_if<!std::is_array< T >::value, std::unique_ptr< T > >::type | make_unique (Args &&...args) |
template<typename T > | |
std::enable_if< std::is_array< T >::value, std::unique_ptr< T > >::type | make_unique (const size_t n) |
template<typename T , typename... Args> | |
std::enable_if< std::extent< T >::value!=0, std::unique_ptr< T > >::type | make_unique (Args &&...)=delete |
template<typename T , typename D > | |
std::shared_ptr< T > | to_shared_ptr (std::unique_ptr< T, D > &&ptr) |
template<typename T > | |
std::weak_ptr< T > | to_weak_ptr (const std::shared_ptr< T > &ptr) |
template<typename T , typename Alloc , typename... Args> | |
std::unique_ptr< T, allocator_delete< Alloc > > | allocate_unique (Alloc const &alloc, Args &&...args) |
SysBufferUniquePtr | allocate_sys_buffer (std::size_t size) |
template<class T , class T0 = typename std::remove_reference<T>::type> | |
MoveWrapper< T0 > | makeMoveWrapper (T &&t) |
template<class CharT , class Traits > | |
std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, const NetworkSocket &addr) |
template<class T > | |
const T * | get_pointer (const Optional< T > &opt) |
template<class T > | |
T * | get_pointer (Optional< T > &opt) |
template<class T > | |
void | swap (Optional< T > &a, Optional< T > &b) noexcept(noexcept(a.swap(b))) |
template<class T > | |
constexpr Optional< _t< std::decay< T > > > | make_optional (T &&v) |
template<class T , class... Args> | |
constexpr folly::Optional< T > | make_optional (Args &&...args) |
template<class T , class U , class... Args> | |
constexpr folly::Optional< T > | make_optional (std::initializer_list< U > il, Args &&...args) |
template<class U , class V > | |
constexpr bool | operator== (const Optional< U > &a, const V &b) |
template<class U , class V > | |
constexpr bool | operator!= (const Optional< U > &a, const V &b) |
template<class U , class V > | |
constexpr bool | operator== (const U &a, const Optional< V > &b) |
template<class U , class V > | |
constexpr bool | operator!= (const U &a, const Optional< V > &b) |
template<class U , class V > | |
FOLLY_CPP14_CONSTEXPR bool | operator== (const Optional< U > &a, const Optional< V > &b) |
template<class U , class V > | |
constexpr bool | operator!= (const Optional< U > &a, const Optional< V > &b) |
template<class U , class V > | |
FOLLY_CPP14_CONSTEXPR bool | operator< (const Optional< U > &a, const Optional< V > &b) |
template<class U , class V > | |
constexpr bool | operator> (const Optional< U > &a, const Optional< V > &b) |
template<class U , class V > | |
constexpr bool | operator<= (const Optional< U > &a, const Optional< V > &b) |
template<class U , class V > | |
constexpr bool | operator>= (const Optional< U > &a, const Optional< V > &b) |
template<class V > | |
bool | operator< (const Optional< V > &, const V &other)=delete |
template<class V > | |
bool | operator<= (const Optional< V > &, const V &other)=delete |
template<class V > | |
bool | operator>= (const Optional< V > &, const V &other)=delete |
template<class V > | |
bool | operator> (const Optional< V > &, const V &other)=delete |
template<class V > | |
bool | operator< (const V &other, const Optional< V > &)=delete |
template<class V > | |
bool | operator<= (const V &other, const Optional< V > &)=delete |
template<class V > | |
bool | operator>= (const V &other, const Optional< V > &)=delete |
template<class V > | |
bool | operator> (const V &other, const Optional< V > &)=delete |
template<class V > | |
constexpr bool | operator== (const Optional< V > &a, None) noexcept |
template<class V > | |
constexpr bool | operator== (None, const Optional< V > &a) noexcept |
template<class V > | |
constexpr bool | operator< (const Optional< V > &, None) noexcept |
template<class V > | |
constexpr bool | operator< (None, const Optional< V > &a) noexcept |
template<class V > | |
constexpr bool | operator> (const Optional< V > &a, None) noexcept |
template<class V > | |
constexpr bool | operator> (None, const Optional< V > &) noexcept |
template<class V > | |
constexpr bool | operator<= (None, const Optional< V > &) noexcept |
template<class V > | |
constexpr bool | operator<= (const Optional< V > &a, None) noexcept |
template<class V > | |
constexpr bool | operator>= (const Optional< V > &, None) noexcept |
template<class V > | |
constexpr bool | operator>= (None, const Optional< V > &a) noexcept |
template<typename... Cases> | |
decltype(auto) | overload (Cases &&...cases) |
template<typename Variant , typename... Cases> | |
decltype(auto) | variant_match (Variant &&variant, Cases &&...cases) |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const PackedSyncPtr< T > &ptr) |
template<class I1 , class I2 , std::enable_if_t< detail::Comparable< I1, I2 >::value, int > = 0> | |
bool | operator== (Poly< I1 > const &_this, Poly< I2 > const &that) |
template<class I1 , class I2 , std::enable_if_t< detail::Comparable< I1, I2 >::value, int > = 0> | |
bool | operator!= (Poly< I1 > const &_this, Poly< I2 > const &that) |
template<class I1 , class I2 , std::enable_if_t< detail::Orderable< I1, I2 >::value, int > = 0> | |
bool | operator< (Poly< I1 > const &_this, Poly< I2 > const &that) |
template<class I1 , class I2 , std::enable_if_t< detail::Orderable< I1, I2 >::value, int > = 0> | |
bool | operator> (Poly< I1 > const &_this, Poly< I2 > const &that) |
template<class I1 , class I2 , std::enable_if_t< detail::Orderable< I1, I2 >::value, int > = 0> | |
bool | operator<= (Poly< I1 > const &_this, Poly< I2 > const &that) |
template<class I1 , class I2 , std::enable_if_t< detail::Orderable< I1, I2 >::value, int > = 0> | |
bool | operator>= (Poly< I1 > const &_this, Poly< I2 > const &that) |
template<std::size_t N, typename This , typename... As> | |
auto | poly_call (This &&_this, As &&...as) -> decltype(detail::PolyAccess::call< N >(static_cast< This && >(_this), static_cast< As && >(as)...)) |
template<std::size_t N, class I , class Tail , typename... As> | |
decltype(auto) | poly_call (detail::PolyNode< I, Tail > &&_this, As &&...as) |
template<std::size_t N, class I , class Tail , typename... As> | |
decltype(auto) | poly_call (detail::PolyNode< I, Tail > &_this, As &&...as) |
template<std::size_t N, class I , class Tail , typename... As> | |
decltype(auto) | poly_call (detail::PolyNode< I, Tail > const &_this, As &&...as) |
template<std::size_t N, class I , class Poly , typename... As, std::enable_if_t< detail::IsPoly< Poly >::value, int > = 0> | |
auto | poly_call (Poly &&_this, As &&...as) -> decltype(poly_call< N, I >(static_cast< Poly && >(_this).get(), static_cast< As && >(as)...)) |
template<class T , class I > | |
detail::AddCvrefOf< T, I > && | poly_cast (detail::PolyRoot< I > &&that) |
template<class T , class Poly , std::enable_if_t< detail::IsPoly< Poly >::value, int > = 0> | |
constexpr auto | poly_cast (Poly &&that) -> decltype(poly_cast< T >(std::declval< Poly >().get())) |
template<class I > | |
std::type_info const & | poly_type (detail::PolyRoot< I > const &that) noexcept |
template<class Poly , std::enable_if_t< detail::IsPoly< Poly >::value, int > = 0> | |
constexpr auto | poly_type (Poly const &that) noexcept-> decltype(poly_type(that.get())) |
template<class I > | |
bool | poly_empty (detail::PolyRoot< I > const &that) noexcept |
template<class I > | |
constexpr bool | poly_empty (detail::PolyRoot< I && > const &) noexcept |
template<class I > | |
constexpr bool | poly_empty (detail::PolyRoot< I & > const &) noexcept |
template<class I > | |
constexpr bool | poly_empty (Poly< I && > const &) noexcept |
template<class I > | |
constexpr bool | poly_empty (Poly< I & > const &) noexcept |
template<class I , std::enable_if_t< detail::Not< std::is_reference< I >>::value, int > = 0> | |
constexpr Poly< I > && | poly_move (detail::PolyRoot< I > &that) noexcept |
template<class I , std::enable_if_t< detail::Not< std::is_const< I >>::value, int > = 0> | |
Poly< I && > | poly_move (detail::PolyRoot< I & > const &that) noexcept |
template<class I > | |
Poly< I const & > | poly_move (detail::PolyRoot< I const & > const &that) noexcept |
template<class Poly , std::enable_if_t< detail::IsPoly< Poly >::value, int > = 0> | |
constexpr auto | poly_move (Poly &that) noexcept-> decltype(poly_move(that.get())) |
template<class I > | |
void | swap (Poly< I > &left, Poly< I > &right) noexcept |
void | asm_volatile_memory () |
void | asm_volatile_pause () |
std::uint64_t | asm_rdtsc () |
template<typename Char > | |
constexpr size_t | constexpr_strlen (const Char *s) |
template<> | |
constexpr size_t | constexpr_strlen (const char *s) |
template<typename Char > | |
constexpr int | constexpr_strcmp (const Char *s1, const Char *s2) |
template<> | |
constexpr int | constexpr_strcmp (const char *s1, const char *s2) |
libevent_fd_t | getLibeventFd (int fd) |
int | libeventFdToFd (libevent_fd_t fd) |
void | folly_event_set (event *e, int fd, short s, EventSetCallback f, void *arg) |
uint32_t | randomNumberSeed () |
template<class Iter , class Comp = std::equal_to<typename Range<Iter>::value_type>> | |
size_t | qfind (const Range< Iter > &haystack, const Range< Iter > &needle, Comp eq=Comp()) |
template<class Iter > | |
size_t | qfind (const Range< Iter > &haystack, const typename Range< Iter >::value_type &needle) |
template<class Iter > | |
size_t | rfind (const Range< Iter > &haystack, const typename Range< Iter >::value_type &needle) |
template<class Iter > | |
size_t | qfind_first_of (const Range< Iter > &haystack, const Range< Iter > &needle) |
template<class Iter > | |
void | swap (Range< Iter > &lhs, Range< Iter > &rhs) |
template<class Iter > | |
constexpr Range< Iter > | range (Iter first, Iter last) |
template<class Collection > | |
constexpr auto | range (Collection &v) -> Range< decltype(v.data())> |
template<class Collection > | |
constexpr auto | range (Collection const &v) -> Range< decltype(v.data())> |
template<class Collection > | |
constexpr auto | crange (Collection const &v) -> Range< decltype(v.data())> |
template<class T , size_t n> | |
constexpr Range< T * > | range (T(&array)[n]) |
template<class T , size_t n> | |
constexpr Range< T const * > | range (T const (&array)[n]) |
template<class T , size_t n> | |
constexpr Range< T const * > | crange (T const (&array)[n]) |
template<class T , size_t n> | |
constexpr Range< T * > | range (std::array< T, n > &array) |
template<class T , size_t n> | |
constexpr Range< T const * > | range (std::array< T, n > const &array) |
template<class T , size_t n> | |
constexpr Range< T const * > | crange (std::array< T, n > const &array) |
template<class C > | |
std::basic_ostream< C > & | operator<< (std::basic_ostream< C > &os, Range< C const * > piece) |
template<class C > | |
std::basic_ostream< C > & | operator<< (std::basic_ostream< C > &os, Range< C * > piece) |
template<class Iter > | |
bool | operator== (const Range< Iter > &lhs, const Range< Iter > &rhs) |
template<class Iter > | |
bool | operator!= (const Range< Iter > &lhs, const Range< Iter > &rhs) |
template<class Iter > | |
bool | operator< (const Range< Iter > &lhs, const Range< Iter > &rhs) |
template<class Iter > | |
bool | operator<= (const Range< Iter > &lhs, const Range< Iter > &rhs) |
template<class Iter > | |
bool | operator> (const Range< Iter > &lhs, const Range< Iter > &rhs) |
template<class Iter > | |
bool | operator>= (const Range< Iter > &lhs, const Range< Iter > &rhs) |
template<class T , class U > | |
_t< std::enable_if< detail::ComparableAsStringPiece< T, U >::value, bool > > | operator== (const T &lhs, const U &rhs) |
template<class T , class U > | |
_t< std::enable_if< detail::ComparableAsStringPiece< T, U >::value, bool > > | operator!= (const T &lhs, const U &rhs) |
template<class T , class U > | |
_t< std::enable_if< detail::ComparableAsStringPiece< T, U >::value, bool > > | operator< (const T &lhs, const U &rhs) |
template<class T , class U > | |
_t< std::enable_if< detail::ComparableAsStringPiece< T, U >::value, bool > > | operator> (const T &lhs, const U &rhs) |
template<class T , class U > | |
_t< std::enable_if< detail::ComparableAsStringPiece< T, U >::value, bool > > | operator<= (const T &lhs, const U &rhs) |
template<class T , class U > | |
_t< std::enable_if< detail::ComparableAsStringPiece< T, U >::value, bool > > | operator>= (const T &lhs, const U &rhs) |
template<class Iter , class Comp > | |
size_t | qfind_first_of (const Range< Iter > &haystack, const Range< Iter > &needles, Comp eq) |
template<> | |
size_t | qfind (const Range< const char * > &haystack, const char &needle) |
template<> | |
size_t | rfind (const Range< const char * > &haystack, const char &needle) |
template<> | |
size_t | qfind (const Range< const unsigned char * > &haystack, const unsigned char &needle) |
template<> | |
size_t | rfind (const Range< const unsigned char * > &haystack, const unsigned char &needle) |
template<> | |
size_t | qfind_first_of (const Range< const char * > &haystack, const Range< const char * > &needles) |
template<> | |
size_t | qfind_first_of (const Range< const unsigned char * > &haystack, const Range< const unsigned char * > &needles) |
template<class T > | |
constexpr Replaceable< std::decay_t< T > > | make_replaceable (T &&t) |
template<class T , class... Args> | |
constexpr Replaceable< T > | make_replaceable (Args &&...args) |
template<class T , class U , class... Args> | |
constexpr Replaceable< T > | make_replaceable (std::initializer_list< U > il, Args &&...args) |
template<typename F > | |
FOLLY_NODISCARD detail::ScopeGuardImplDecay< F, true > | makeGuard (F &&f) noexcept(noexcept(detail::ScopeGuardImplDecay< F, true >(static_cast< F && >(f)))) |
template<class T , std::size_t MaxInline, class A , class B , class C > | |
void | swap (small_vector< T, MaxInline, A, B, C > &a, small_vector< T, MaxInline, A, B, C > &b) |
size_t | hash_value (const SocketAddress &address) |
std::ostream & | operator<< (std::ostream &os, const SocketAddress &addr) |
template<class T , class C , class A , class G > | |
void | swap (sorted_vector_set< T, C, A, G > &a, sorted_vector_set< T, C, A, G > &b) |
template<class K , class V , class C , class A , class G > | |
void | swap (sorted_vector_map< K, V, C, A, G > &a, sorted_vector_map< K, V, C, A, G > &b) |
static double | k_to_q (double k, double d) |
static double | clamp (double v, double lo, double hi) |
template<class String > | |
void | cEscape (StringPiece str, String &out) |
template<class String > | |
void | cUnescape (StringPiece str, String &out, bool strict) |
template<class String > | |
void | uriEscape (StringPiece str, String &out, UriEscapeMode mode) |
template<class String > | |
void | uriUnescape (StringPiece str, String &out, UriEscapeMode mode) |
template<class Delim , class String , class OutputType > | |
void | split (const Delim &delimiter, const String &input, std::vector< OutputType > &out, bool ignoreEmpty) |
template<class Delim , class String , class OutputType > | |
void | split (const Delim &delimiter, const String &input, fbvector< OutputType > &out, bool ignoreEmpty) |
template<class OutputValueType , class Delim , class String , class OutputIterator > | |
void | splitTo (const Delim &delimiter, const String &input, OutputIterator out, bool ignoreEmpty) |
template<bool exact, class Delim , class... OutputTypes> | |
bool::type | split (const Delim &delimiter, StringPiece input, OutputTypes &...outputs) |
template<class Delim , class Iterator , class String > | |
void | join (const Delim &delimiter, Iterator begin, Iterator end, String &output) |
template<class OutputString > | |
void | backslashify (folly::StringPiece input, OutputString &output, bool hex_style) |
template<class String1 , class String2 > | |
void | humanify (const String1 &input, String2 &output) |
template<class InputString , class OutputString > | |
bool | hexlify (const InputString &input, OutputString &output, bool append_output) |
template<class InputString , class OutputString > | |
bool | unhexlify (const InputString &input, OutputString &output) |
template<class OutIt > | |
void | hexDump (const void *ptr, size_t size, OutIt out) |
static bool | is_oddspace (char c) |
StringPiece | ltrimWhitespace (StringPiece sp) |
StringPiece | rtrimWhitespace (StringPiece sp) |
std::string | stringPrintf (const char *format,...) |
std::string | stringVPrintf (const char *format, va_list ap) |
std::string & | stringAppendf (std::string *output, const char *format,...) |
std::string & | stringVAppendf (std::string *output, const char *format, va_list ap) |
void | stringPrintf (std::string *output, const char *format,...) |
void | stringVPrintf (std::string *output, const char *format, va_list ap) |
std::string | prettyPrint (double val, PrettyType type, bool addSpace) |
double | prettyToDouble (folly::StringPiece *const prettyString, const PrettyType type) |
double | prettyToDouble (folly::StringPiece prettyString, const PrettyType type) |
std::string | hexDump (const void *ptr, size_t size) |
fbstring | errnoStr (int err) |
void | toLowerAscii (char *str, size_t length) |
std::string | stripLeftMargin (std::string s) |
std::string | toStdString (const folly::fbstring &s) |
const std::string & | toStdString (const std::string &s) |
std::string && | toStdString (std::string &&s) |
template<class String > | |
String | cEscape (StringPiece str) |
template<class String > | |
String | cUnescape (StringPiece str, bool strict=true) |
template<class String > | |
String | uriEscape (StringPiece str, UriEscapeMode mode=UriEscapeMode::ALL) |
template<class String > | |
String | uriUnescape (StringPiece str, UriEscapeMode mode=UriEscapeMode::ALL) |
std::string | stringPrintf (FOLLY_PRINTF_FORMAT const char *format,...) FOLLY_PRINTF_FORMAT_ATTR(1 |
std::string void | stringPrintf (std::string *out, FOLLY_PRINTF_FORMAT const char *fmt,...) FOLLY_PRINTF_FORMAT_ATTR(2 |
std::string void std::string & | stringAppendf (std::string *output, FOLLY_PRINTF_FORMAT const char *format,...) FOLLY_PRINTF_FORMAT_ATTR(2 |
template<class OutputString = std::string> | |
OutputString | backslashify (StringPiece input, bool hex_style=false) |
template<class String > | |
String | humanify (const String &input) |
template<class OutputString = std::string> | |
OutputString | hexlify (ByteRange input) |
template<class OutputString = std::string> | |
OutputString | hexlify (StringPiece input) |
template<class OutputString = std::string> | |
OutputString | unhexlify (StringPiece input) |
template<class Delim , class Container , class String > | |
void | join (const Delim &delimiter, const Container &container, String &output) |
template<class Delim , class Value , class String > | |
void | join (const Delim &delimiter, const std::initializer_list< Value > &values, String &output) |
template<class Delim , class Container > | |
std::string | join (const Delim &delimiter, const Container &container) |
template<class Delim , class Value > | |
std::string | join (const Delim &delimiter, const std::initializer_list< Value > &values) |
template<class Delim , class Iterator , typename std::enable_if< std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits< Iterator >::iterator_category >::value >::type * = nullptr> | |
std::string | join (const Delim &delimiter, Iterator begin, Iterator end) |
StringPiece | trimWhitespace (StringPiece sp) |
StringPiece | skipWhitespace (StringPiece sp) |
void | toLowerAscii (MutableStringPiece str) |
void | toLowerAscii (std::string &str) |
static std::string | toSubprocessSpawnErrorMessage (char const *executable, int errCode, int errnoValue) |
void | asymmetricHeavyBarrier (AMBFlags flags) |
FOLLY_ALWAYS_INLINE void | asymmetricLightBarrier () |
template<typename Integer > | |
void | atomic_wait (const std::atomic< Integer > *atomic, Integer expected) |
template<typename Integer , typename Clock , typename Duration > | |
std::cv_status | atomic_wait_until (const std::atomic< Integer > *atomic, Integer expected, const std::chrono::time_point< Clock, Duration > &deadline) |
template<typename Integer > | |
void | atomic_notify_one (const std::atomic< Integer > *atomic) |
template<typename Integer > | |
void | atomic_notify_all (const std::atomic< Integer > *atomic) |
template<typename Atomic > | |
bool | atomic_fetch_set (Atomic &atomic, std::size_t bit, std::memory_order mo) |
template<typename Atomic > | |
bool | atomic_fetch_reset (Atomic &atomic, std::size_t bit, std::memory_order mo) |
template<typename Mutex , template< typename > class Atom, typename F , typename... Args> | |
FOLLY_ALWAYS_INLINE void | call_once (basic_once_flag< Mutex, Atom > &flag, F &&f, Args &&...args) |
template<template< typename > class Atom = std::atomic> | |
hazptr_tc< Atom > & | hazptr_tc_tls () |
template<template< typename > class Atom = std::atomic> | |
hazptr_priv< Atom > & | hazptr_priv_tls () |
template<template< typename > class Atom = std::atomic> | |
hazptr_domain< Atom > & | default_hazptr_domain () |
template<template< typename > class Atom = std::atomic> | |
void | hazptr_domain_push_retired (hazptr_obj_list< Atom > &l, bool check=true, hazptr_domain< Atom > &domain=default_hazptr_domain< Atom >()) noexcept |
template<template< typename > class Atom = std::atomic, typename T , typename D = std::default_delete<T>> | |
void | hazptr_retire (T *obj, D reclaim={}) |
template<template< typename > class Atom = std::atomic> | |
void | hazptr_cleanup (hazptr_domain< Atom > &domain=default_hazptr_domain< Atom >()) noexcept |
template<template< typename > class Atom = std::atomic> | |
void | swap (hazptr_holder< Atom > &, hazptr_holder< Atom > &) noexcept |
template<template< typename > class Atom> | |
FOLLY_ALWAYS_INLINE hazptr_domain< Atom > & | default_hazptr_domain () |
template<template< typename > class Atom, typename T , typename D > | |
FOLLY_ALWAYS_INLINE void | hazptr_retire (T *obj, D reclaim) |
template<template< typename > class Atom> | |
FOLLY_ALWAYS_INLINE void | swap (hazptr_holder< Atom > &lhs, hazptr_holder< Atom > &rhs) noexcept |
FOLLY_STATIC_CTOR_PRIORITY_MAX folly::Indestructible< rcu_domain< RcuTag > * > | rcu_default_domain_ (folly::detail::createGlobal< rcu_domain< RcuTag >, RcuTag >()) |
rcu_domain< RcuTag > * | rcu_default_domain () |
template<typename Tag = RcuTag> | |
void | swap (rcu_reader_domain< Tag > &a, rcu_reader_domain< Tag > &b) noexcept |
template<typename Tag = RcuTag> | |
void | synchronize_rcu (rcu_domain< Tag > *domain=rcu_default_domain()) noexcept |
template<typename Tag = RcuTag> | |
void | rcu_barrier (rcu_domain< Tag > *domain=rcu_default_domain()) noexcept |
template<typename T , typename D = std::default_delete<T>, typename Tag = RcuTag> | |
void | rcu_retire (T *p, D d={}, rcu_domain< Tag > *domain=rcu_default_domain()) |
static FOLLY_ALWAYS_INLINE void | annotate_rwlock_create (void const volatile *const addr, char const *const f, int const l) |
static FOLLY_ALWAYS_INLINE void | annotate_rwlock_create_static (void const volatile *const addr, char const *const f, int const l) |
static FOLLY_ALWAYS_INLINE void | annotate_rwlock_destroy (void const volatile *const addr, char const *const f, int const l) |
static FOLLY_ALWAYS_INLINE void | annotate_rwlock_acquired (void const volatile *const addr, annotate_rwlock_level const w, char const *const f, int const l) |
static FOLLY_ALWAYS_INLINE void | annotate_rwlock_try_acquired (void const volatile *const addr, annotate_rwlock_level const w, bool const result, char const *const f, int const l) |
static FOLLY_ALWAYS_INLINE void | annotate_rwlock_released (void const volatile *const addr, annotate_rwlock_level const w, char const *const f, int const l) |
static FOLLY_ALWAYS_INLINE void | annotate_benign_race_sized (void const volatile *const addr, long const size, char const *const desc, char const *const f, int const l) |
TEST (AtomicWait, Basic) | |
TEST (AtomicWait, BasicNonStandardWidths) | |
TEST (AtomicWait, AtomicWaitUntilTimeout) | |
TEST (AtomicWait, AtomicWaitUntilTimeoutNonStandardWidths) | |
TEST (AtomicWait, AtomicWaitUntilNotified) | |
TEST (AtomicWait, AtomicWaitUntilNotifiedNonStandardWidths) | |
TEST (AtomicWait, AtomicWaitAliasing) | |
TEST (AtomicWait, AtomicWaitAliasingNonStandardWidths) | |
TEST_F (AtomicFetchSetTest, Basic) | |
TEST_F (AtomicFetchResetTest, Basic) | |
TEST_F (AtomicFetchSetTest, EnsureFetchOrUsed) | |
TEST_F (AtomicFetchResetTest, EnsureFetchAndUsed) | |
TEST_F (AtomicFetchSetTest, FetchSetDefault) | |
TEST_F (AtomicFetchSetTest, FetchResetDefault) | |
TEST_F (AtomicFetchSetTest, FetchSetX86) | |
TEST_F (AtomicFetchResetTest, FetchResetX86) | |
TEST (DistributedMutex, InternalDetailTestOne) | |
TEST (DistributedMutex, Basic) | |
TEST (DistributedMutex, BasicTryLock) | |
TEST (DistributedMutex, TestSingleElementContentionChain) | |
TEST (DistributedMutex, TestTwoElementContentionChain) | |
TEST (DistributedMutex, TestTwoContentionChains) | |
TEST (DistributedMutex, StressTwoThreads) | |
TEST (DistributedMutex, StressThreeThreads) | |
TEST (DistributedMutex, StressFourThreads) | |
TEST (DistributedMutex, StressFiveThreads) | |
TEST (DistributedMutex, StressSixThreads) | |
TEST (DistributedMutex, StressSevenThreads) | |
TEST (DistributedMutex, StressEightThreads) | |
TEST (DistributedMutex, StressSixteenThreads) | |
TEST (DistributedMutex, StressThirtyTwoThreads) | |
TEST (DistributedMutex, StressSixtyFourThreads) | |
TEST (DistributedMutex, StressHundredThreads) | |
TEST (DistributedMutex, StressHardwareConcurrencyThreads) | |
TEST (DistributedMutex, StressTryLock) | |
TEST (DistributedMutex, DeterministicStressTwoThreads) | |
TEST (DistributedMutex, DeterministicStressFourThreads) | |
TEST (DistributedMutex, DeterministicStressEightThreads) | |
TEST (DistributedMutex, DeterministicStressSixteenThreads) | |
TEST (DistributedMutex, DeterministicStressThirtyTwoThreads) | |
TEST (DistributedMutex, TimedLockTimeout) | |
TEST (DistributedMutex, TimedLockAcquireAfterUnlock) | |
TEST (DistributedMutex, TimedLockAcquireAfterLock) | |
TEST (DistributedMutex, TimedLockAcquireAfterContentionChain) | |
TEST (DistributedMutex, StressTryLockWithConcurrentLocksTwoThreads) | |
TEST (DistributedMutex, StressTryLockWithConcurrentLocksFourThreads) | |
TEST (DistributedMutex, StressTryLockWithConcurrentLocksEightThreads) | |
TEST (DistributedMutex, StressTryLockWithConcurrentLocksSixteenThreads) | |
TEST (DistributedMutex, StressTryLockWithConcurrentLocksThirtyTwoThreads) | |
TEST (DistributedMutex, StressTryLockWithConcurrentLocksSixtyFourThreads) | |
TEST (DistributedMutex, DeterministicTryLockWithLocksTwoThreads) | |
TEST (DistributedMutex, DeterministicTryLockWithFourThreads) | |
TEST (DistributedMutex, DeterministicTryLockWithLocksEightThreads) | |
TEST (DistributedMutex, DeterministicTryLockWithLocksSixteenThreads) | |
TEST (DistributedMutex, DeterministicTryLockWithLocksThirtyTwoThreads) | |
TEST (DistributedMutex, DeterministicTryLockWithLocksSixtyFourThreads) | |
TEST (DistributedMutex, StressTryLockWithTwoThreads) | |
TEST (DistributedMutex, StressTryLockFourThreads) | |
TEST (DistributedMutex, StressTryLockEightThreads) | |
TEST (DistributedMutex, StressTryLockSixteenThreads) | |
TEST (DistributedMutex, StressTryLockThirtyTwoThreads) | |
TEST (DistributedMutex, StressTryLockSixtyFourThreads) | |
TEST (DistributedMutex, DeterministicTryLockTwoThreads) | |
TEST (DistributedMutex, DeterministicTryLockFourThreads) | |
TEST (DistributedMutex, DeterministicTryLockEightThreads) | |
TEST (DistributedMutex, DeterministicTryLockSixteenThreads) | |
TEST (DistributedMutex, DeterministicTryLockThirtyTwoThreads) | |
TEST (DistributedMutex, DeterministicTryLockSixtyFourThreads) | |
template<typename D , typename M , typename... Args> | |
auto | wlock (Synchronized< D, M > &synchronized, Args &&...args) |
template<typename Data , typename Mutex , typename... Args> | |
auto | rlock (const Synchronized< Data, Mutex > &synchronized, Args &&...args) |
template<typename D , typename M , typename... Args> | |
auto | ulock (Synchronized< D, M > &synchronized, Args &&...args) |
template<typename D , typename M , typename... Args> | |
auto | lock (Synchronized< D, M > &synchronized, Args &&...args) |
template<typename D , typename M , typename... Args> | |
auto | lock (const Synchronized< D, M > &synchronized, Args &&...args) |
template<typename Func , typename... SynchronizedLockers> | |
decltype(auto) | synchronized (Func &&func, SynchronizedLockers &&...lockers) |
template<typename LockableOne , typename LockableTwo , typename... Lockables> | |
void | lock (LockableOne &one, LockableTwo &two, Lockables &...lockables) |
template<class Sync1 , class Sync2 > | |
std::tuple< detail::LockedPtrType< Sync1 >, detail::LockedPtrType< Sync2 > > | acquireLocked (Sync1 &l1, Sync2 &l2) |
template<class Sync1 , class Sync2 > | |
std::pair< detail::LockedPtrType< Sync1 >, detail::LockedPtrType< Sync2 > > | acquireLockedPair (Sync1 &l1, Sync2 &l2) |
template<class T , class M > | |
void | swap (Synchronized< T, M > &lhs, Synchronized< T, M > &rhs) |
void | swap (MemoryMapping &a, MemoryMapping &b) noexcept |
void | alignedForwardMemcpy (void *dst, const void *src, size_t size) |
void | mmapFileCopy (const char *src, const char *dest, mode_t mode) |
std::string | shellQuote (StringPiece argument) |
template<typename... Arguments> | |
std::vector< std::string > | shellify (StringPiece format, Arguments &&...arguments) |
TEST (MemoryMapping, Basic) | |
TEST (MemoryMapping, Move) | |
TEST (MemoryMapping, DoublyMapped) | |
TEST (MemoryMapping, Simple) | |
TEST (MemoryMapping, LargeFile) | |
TEST (MemoryMapping, ZeroLength) | |
TEST (MemoryMapping, Advise) | |
uint64_t | getCurrentThreadID () |
uint64_t | getOSThreadID () |
bool | canSetCurrentThreadName () |
bool | canSetOtherThreadName () |
Optional< std::string > | getThreadName (std::thread::id id) |
Optional< std::string > | getCurrentThreadName () |
bool | setThreadName (std::thread::id tid, StringPiece name) |
bool | setThreadName (pthread_t pid, StringPiece name) |
bool | setThreadName (StringPiece name) |
template<> | |
CacheLocality const & | CacheLocality::system< test::DeterministicAtomic > () |
TEST (ExecutorTest, KeepAliveBasic) | |
TEST (ExecutorTest, KeepAliveMove) | |
TEST (ExecutorTest, KeepAliveConvert) | |
TEST (ExecutorTest, KeepAliveCopy) | |
std::ostream & | operator<< (std::ostream &os, E e) |
template<class V , class E > | |
std::ostream & | operator<< (std::ostream &os, const Expected< V, E > &e) |
TEST (Expected, NoDefault) | |
TEST (Expected, String) | |
TEST (Expected, Ambiguous) | |
TEST (Expected, Const) | |
TEST (Expected, Simple) | |
bool | operator== (const MoveTester &o1, const MoveTester &o2) |
TEST (Expected, value_or_rvalue_arg) | |
TEST (Expected, value_or_noncopyable) | |
TEST (Expected, value_move) | |
TEST (Expected, dereference_move) | |
TEST (Expected, EmptyConstruct) | |
TEST (Expected, Unique) | |
TEST (Expected, Shared) | |
TEST (Expected, Order) | |
TEST (Expected, SwapMethod) | |
TEST (Expected, StdSwapFunction) | |
TEST (Expected, FollySwapFunction) | |
TEST (Expected, Comparisons) | |
TEST (Expected, Conversions) | |
TEST (Expected, Pointee) | |
TEST (Expected, MakeOptional) | |
TEST (Expected, SelfAssignment) | |
TEST (Expected, AssignmentContained) | |
TEST (Expected, Exceptions) | |
TEST (Expected, NoThrowDefaultConstructible) | |
TEST (Expected, NoThrowMoveConstructible) | |
TEST (Expected, NoThrowMoveAssignable) | |
TEST (Expected, NoSelfAssign) | |
TEST (Expected, TriviallyDestructible) | |
TEST (Expected, TriviallyCopyable) | |
TEST (Expected, Then) | |
TEST (Expected, ThenOrThrow) | |
BENCHMARK (SmallFunctionFunctionPointerInvoke, iters) | |
BENCHMARK (SmallFunctionStdFunctionInvoke, iters) | |
BENCHMARK (SmallFunctionStdFunctionWithReferenceWrapperInvoke, iters) | |
BENCHMARK (SmallFunctionFollyFunctionInvoke, iters) | |
BENCHMARK (SmallFunctionFollyFunctionRefInvoke, iters) | |
BENCHMARK_DRAW_LINE () | |
BENCHMARK (SmallFunctionFunctionPointerCreateInvoke, iters) | |
BENCHMARK (SmallFunctionStdFunctionCreateInvoke, iters) | |
BENCHMARK (SmallFunctionStdFunctionReferenceWrapperCreateInvoke, iters) | |
BENCHMARK (SmallFunctionFollyFunctionCreateInvoke, iters) | |
BENCHMARK (SmallFunctionFollyFunctionRefCreateInvoke, iters) | |
BENCHMARK (BigFunctionStdFunctionInvoke, iters) | |
BENCHMARK (BigFunctionStdFunctionReferenceWrapperInvoke, iters) | |
BENCHMARK (BigFunctionFollyFunctionInvoke, iters) | |
BENCHMARK (BigFunctionFollyFunctionRefInvoke, iters) | |
BENCHMARK (BigFunctionStdFunctionCreateInvoke, iters) | |
BENCHMARK (BigFunctionStdFunctionReferenceWrapperCreateInvoke, iters) | |
BENCHMARK (BigFunctionFollyFunctionCreateInvoke, iters) | |
BENCHMARK (BigFunctionFollyFunctionRefCreateInvoke, iters) | |
bool | compareJson (StringPiece json1, StringPiece json2) |
bool | compareDynamicWithTolerance (const dynamic &obj1, const dynamic &obj2, double tolerance) |
bool | compareJsonWithTolerance (StringPiece json1, StringPiece json2, double tolerance) |
TEST (Lazy, Simple) | |
TEST (Lazy, Global) | |
TEST (Lazy, Map) | |
TEST (Lazy, NonLambda) | |
TEST (Lazy, Consty) | |
TEST (makeMoveWrapper, Empty) | |
TEST (makeMoveWrapper, NonEmpty) | |
TEST (makeMoveWrapper, rvalue) | |
TEST (makeMoveWrapper, lvalue) | |
TEST (makeMoveWrapper, lvalue_copyable) | |
TEST (Optional, NoDefault) | |
TEST (Optional, Emplace) | |
TEST (Optional, EmplaceInitializerList) | |
TEST (Optional, Reset) | |
TEST (Optional, String) | |
TEST (Optional, Const) | |
TEST (Optional, Simple) | |
TEST (Optional, value_or_rvalue_arg) | |
TEST (Optional, value_or_noncopyable) | |
TEST (Optional, value_move) | |
TEST (Optional, dereference_move) | |
TEST (Optional, EmptyConstruct) | |
TEST (Optional, InPlaceConstruct) | |
TEST (Optional, InPlaceNestedConstruct) | |
TEST (Optional, Unique) | |
TEST (Optional, Shared) | |
TEST (Optional, Order) | |
TEST (Optional, Swap) | |
TEST (Optional, Comparisons) | |
TEST (Optional, HeterogeneousComparisons) | |
TEST (Optional, NoneComparisons) | |
TEST (Optional, Conversions) | |
TEST (Optional, Pointee) | |
TEST (Optional, MakeOptional) | |
TEST (Optional, InitializerListConstruct) | |
TEST (Optional, TestDisambiguationMakeOptionalVariants) | |
TEST (Optional, SelfAssignment) | |
TEST (Optional, AssignmentContained) | |
TEST (Optional, Exceptions) | |
TEST (Optional, NoThrowDefaultConstructible) | |
TEST (Optional, TriviallyDestructible) | |
TEST (Optional, Hash) | |
TEST (Optional, ConstMember) | |
TEST (Optional, NoneMatchesNullopt) | |
bool | operator== (MutableStringPiece mp, StringPiece sp) |
bool | operator== (StringPiece sp, MutableStringPiece mp) |
TYPED_TEST_CASE (SynchronizedTest, SynchronizedTestTypes) | |
TYPED_TEST (SynchronizedTest, Basic) | |
TYPED_TEST (SynchronizedTest, WithLock) | |
TYPED_TEST (SynchronizedTest, Unlock) | |
TYPED_TEST (SynchronizedTest, Deprecated) | |
TYPED_TEST (SynchronizedTest, Concurrency) | |
TYPED_TEST (SynchronizedTest, AcquireLocked) | |
TYPED_TEST (SynchronizedTest, AcquireLockedWithConst) | |
TYPED_TEST (SynchronizedTest, DualLocking) | |
TYPED_TEST (SynchronizedTest, DualLockingWithConst) | |
TYPED_TEST (SynchronizedTest, ConstCopy) | |
TYPED_TEST (SynchronizedTest, InPlaceConstruction) | |
TYPED_TEST (SynchronizedTest, Exchange) | |
TYPED_TEST_CASE (SynchronizedTimedTest, SynchronizedTimedTestTypes) | |
TYPED_TEST (SynchronizedTimedTest, Timed) | |
TYPED_TEST (SynchronizedTimedTest, TimedSynchronized) | |
TYPED_TEST_CASE (SynchronizedTimedWithConstTest, SynchronizedTimedWithConstTestTypes) | |
TYPED_TEST (SynchronizedTimedWithConstTest, TimedShared) | |
TYPED_TEST (SynchronizedTimedWithConstTest, TimedSynchronizeWithConst) | |
TEST_F (SynchronizedLockTest, TestCopyConstructibleValues) | |
TEST_F (SynchronizedLockTest, UpgradableLocking) | |
TEST_F (SynchronizedLockTest, UpgradableLockingWithULock) | |
TEST_F (SynchronizedLockTest, TestPieceWiseConstruct) | |
TEST_F (SynchronizedLockTest, TestTryLock) | |
TEST_F (SynchronizedLockTest, TestTryWLock) | |
TEST_F (SynchronizedLockTest, TestTryRLock) | |
TEST_F (SynchronizedLockTest, TestTryULock) | |
TEST_F (SynchronizedLockTest, TestLockedPtrCompatibilityExclusive) | |
TEST_F (SynchronizedLockTest, TestLockedPtrCompatibilityShared) | |
TEST_F (SynchronizedLockTest, TestLockedPtrCompatibilityUpgrade) | |
TEST_F (SynchronizedLockTest, TestConvertTryLockToLock) | |
TEST (FollyLockTest, TestVariadicLockWithSynchronized) | |
TEST (FollyLockTest, TestVariadicLockWithArbitraryLockables) | |
TEST (FollyLockTest, TestVariadicLockSmartAndPoliteAlgorithm) | |
TEST (SynchronizedAlgorithmTest, Basic) | |
TEST (SynchronizedAlgorithmTest, BasicNonShareableMutex) | |
TEST (Synchronized, SynchronizedFunctionNonConst) | |
TEST (Synchronized, SynchronizedFunctionConst) | |
TEST (Synchronized, SynchronizedFunctionManyObjects) | |
void | PrintTo (StringPiece sp,::std::ostream *os) |
template<> | |
FOLLY_ASSUME_RELOCATABLE (T2) | |
vector< detail::BenchmarkResult > | resultsFromFile (const std::string &filename) |
void | compareBenchmarkResults (const std::string &base, const std::string &test) |
template<typename T > | |
constexpr bool | is_negative (T x) |
template<typename T > | |
constexpr bool | is_non_positive (T x) |
template<typename T > | |
constexpr bool | is_positive (T x) |
template<typename T > | |
constexpr bool | is_non_negative (T x) |
template<typename RHS , RHS rhs, typename LHS > | |
bool | less_than (LHS const lhs) |
template<typename RHS , RHS rhs, typename LHS > | |
bool | greater_than (LHS const lhs) |
template<typename F > | |
std::enable_if< !std::is_same< invoke_result_t< F >, void >::value, Try< invoke_result_t< F > > >::type | makeTryWith (F &&f) |
template<typename F > | |
std::enable_if< std::is_same< invoke_result_t< F >, void >::value, Try< void > >::type | makeTryWith (F &&f) |
template<typename T , typename... Args> | |
T * | tryEmplace (Try< T > &t, Args &&...args) noexcept |
void | tryEmplace (Try< void > &t) noexcept |
template<typename T , typename Func > | |
T * | tryEmplaceWith (Try< T > &t, Func &&func) noexcept |
template<typename Func > | |
bool | tryEmplaceWith (Try< void > &t, Func &&func) noexcept |
template<typename Tuple > | |
auto | unwrapTryTuple (Tuple &&instance) |
std::string | codePointToUtf8 (char32_t cp) |
char32_t | utf8ToCodePoint (const unsigned char *&p, const unsigned char *const e, bool skipOnError) |
template<typename T > | |
constexpr std::decay< T >::type | copy (T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value)))) |
template<class T > | |
constexpr T const & | as_const (T &t) noexcept |
template<class T > | |
void | as_const (T const &&)=delete |
template<typename Src , typename Dst > | |
constexpr like_t< Src, Dst > && | forward_like (Dst &&dst) noexcept |
template<class T , class U = T> | |
T | exchange (T &obj, U &&new_value) |
in_place_tag | in_place (in_place_tag={}) |
template<class T > | |
in_place_type_tag< T > | in_place_type (in_place_type_tag< T >={}) |
template<std::size_t I> | |
in_place_index_tag< I > | in_place_index (in_place_index_tag< I >={}) |
template<typename T > | |
constexpr auto | to_signed (T const &t) -> typename std::make_signed< T >::type |
template<typename T > | |
constexpr auto | to_unsigned (T const &t) -> typename std::make_unsigned< T >::type |
size_t | encodeVarint (uint64_t val, uint8_t *buf) |
int | encodeVarintSize (uint64_t val) |
template<class T > | |
uint64_t | decodeVarint (Range< T * > &data) |
template<class T > | |
Expected< uint64_t, DecodeVarintError > | tryDecodeVarint (Range< T * > &data) |
uint64_t | encodeZigZag (int64_t val) |
int64_t | decodeZigZag (uint64_t val) |
template<> | |
folly::dynamic | toDynamic (const wangle::SSLSessionCacheData &data) |
template<> | |
wangle::SSLSessionCacheData | convertTo (const dynamic &d) |
Variables | |
template<class Tgt , class Src > | |
std::enable_if< std::is_integral< Src >::value &&IsSomeString< Tgt >::value &&sizeof(Src)< 4 >::typetoAppend(Src value, Tgt *result){typedef typename std::conditional< std::is_signed< Src >::value, int64_t, uint64_t >::type Intermediate;toAppend< Tgt >static_cast< Intermediate >value), result);}template< class Src >typename std::enable_if< std::is_integral< Src >::value &&sizeof(Src)< 4 &&!std::is_same< Src, char >::value, size_t >::typeestimateSpaceNeeded(Src value){typedef typename std::conditional< std::is_signed< Src >::value, int64_t, uint64_t >::type Intermediate;return estimateSpaceNeeded(static_cast< Intermediate >value));}template< class Tgt, class Src >typename std::enable_if< std::is_enum< Src >::value &&IsSomeString< Tgt >::value >::typetoAppend(Src value, Tgt *result){toAppend(static_cast< typename std::underlying_type< Src >::type >value), result);}template< class Src >typename std::enable_if< std::is_enum< Src >::value, size_t >::typeestimateSpaceNeeded(Src value){return estimateSpaceNeeded(static_cast< typename std::underlying_type< Src >::type >value));}namespace detail{constexpr int kConvMaxDecimalInShortestLow=-6;constexpr int kConvMaxDecimalInShortestHigh=21;}template< class Tgt, class Src >typename std::enable_if< std::is_floating_point< Src >::value &&IsSomeString< Tgt >::value >::typetoAppend(Src value, Tgt *result, double_conversion::DoubleToStringConverter::DtoaMode mode, unsigned int numDigits){using namespace double_conversion;DoubleToStringConverter conv(DoubleToStringConverter::NO_FLAGS,"Infinity","NaN", 'E', detail::kConvMaxDecimalInShortestLow, detail::kConvMaxDecimalInShortestHigh, 6, 1);char buffer[256];StringBuilder builder(buffer, sizeof(buffer));switch(mode){case DoubleToStringConverter::SHORTEST:conv.ToShortest(value,&builder);break;case DoubleToStringConverter::SHORTEST_SINGLE:conv.ToShortestSingle(static_cast< float >value),&builder);break;case DoubleToStringConverter::FIXED:conv.ToFixed(value, int(numDigits),&builder);break;default:CHECK(mode==DoubleToStringConverter::PRECISION);conv.ToPrecision(value, int(numDigits),&builder);break;}const size_t length=size_t(builder.position());builder.Finalize();result->append(buffer, length);}template< class Tgt, class Src >typename std::enable_if< std::is_floating_point< Src >::value &&IsSomeString< Tgt >::value >::typetoAppend(Src value, Tgt *result){toAppend(value, result, double_conversion::DoubleToStringConverter::SHORTEST, 0);}template< class Src >typename std::enable_if< std::is_floating_point< Src >::value, size_t >::typeestimateSpaceNeeded(Src value){constexpr int kMaxMantissaSpace=double_conversion::DoubleToStringConverter::kBase10MaximalLength+1;constexpr int kMaxExponentSpace=2+3;static const int kMaxPositiveSpace=std::max({kMaxMantissaSpace+kMaxExponentSpace, kMaxMantissaSpace-detail::kConvMaxDecimalInShortestLow, detail::kConvMaxDecimalInShortestHigh,});return size_t(kMaxPositiveSpace+(value< 0?1:0));}template< class Src >struct HasLengthEstimator:std::false_type{};template< class Src >constexpr typename std::enable_if< !std::is_fundamental< Src >::value &&!IsSomeString< Src >::value &&!std::is_convertible< Src, const char * >::value &&!std::is_convertible< Src, StringPiece >::value &&!std::is_enum< Src >::value &&!HasLengthEstimator< Src >::value, size_t >::typeestimateSpaceNeeded(const Src &){return sizeof(Src)+1;}namespace detail{template< class Tgt >typename std::enable_if< IsSomeString< Tgt >::value, size_t >::typeestimateSpaceToReserve(size_t sofar, Tgt *){return sofar;}template< class T, class...Ts >size_t estimateSpaceToReserve(size_t sofar, const T &v, const Ts &...vs){return estimateSpaceToReserve(sofar+estimateSpaceNeeded(v), vs...);}template< class...Ts >void reserveInTarget(const Ts &...vs){getLastElement(vs...) -> | reserve (estimateSpaceToReserve(0, vs...)) |
static const ScaleInfo | kTimeSuffixes [] |
static const ScaleInfo | kMetricSuffixes [] |
constexpr auto | loop_break = for_each_detail::LoopControl::BREAK |
constexpr auto | loop_continue = for_each_detail::LoopControl::CONTINUE |
folly::std | Delimiter |
folly::std | T |
static constexpr uint32_t | crc32c_m = 0x82f63b78 |
static constexpr uint32_t | crc32_m = 0xedb88320 |
static constexpr std::array< uint32_t, 62 > const | crc32c_powers |
static constexpr std::array< uint32_t, 62 > const | crc32_powers |
static constexpr bool | msgErrQueueSupported |
static constexpr bool | msgErrQueueSupported |
const AsyncSocketException | socketClosedLocallyEx (AsyncSocketException::END_OF_FILE,"socket closed locally") |
const AsyncSocketException | socketShutdownForWritesEx (AsyncSocketException::END_OF_FILE,"socket shutdown for writes") |
static std::mutex | libevent_mutex_ |
const char * | kTestCert = "folly/io/async/test/certs/tests-cert.pem" |
const char * | kTestKey = "folly/io/async/test/certs/tests-key.pem" |
const char * | kTestCA = "folly/io/async/test/certs/ca-cert.pem" |
const char * | kClientTestCert = "folly/io/async/test/certs/client_cert.pem" |
const char * | kClientTestKey = "folly/io/async/test/certs/client_key.pem" |
const char * | kClientTestCA = "folly/io/async/test/certs/client_ca_cert.pem" |
static Singleton< ShutdownSocketSet, PrivateTag > | singleton |
constexpr std::size_t | max_align_v = detail::max_align_v_::value |
constexpr std::size_t | hardware_destructive_interference_size |
constexpr std::size_t | hardware_constructive_interference_size = 64 |
FOLLY_PACK_PUSH struct folly::Unaligned< T, typename std::enable_if< std::is_pod< T >::value >::type > | FOLLY_PACK_ATTR |
constexpr LogLevel | kDefaultLogLevel = LogLevel::INFO |
constexpr auto | kIntegerDivisionGivesRemainder = true |
static const size_t | jemallocMinInPlaceExpandable = 4096 |
constexpr None | none {None::_secret::_token} |
template<class Sig > | |
constexpr detail::Sig< Sig > const | sig = {} |
constexpr size_t | kIovMax = UIO_MAXIOV |
constexpr bool | kHasUnalignedAccess = false |
constexpr bool | kIsArchArm = 0 == 1 |
constexpr bool | kIsArchAmd64 = 0 == 1 |
constexpr bool | kIsArchAArch64 = 0 == 1 |
constexpr bool | kIsArchPPC64 = 0 == 1 |
constexpr bool | kIsSanitizeAddress = false |
constexpr bool | kIsSanitizeThread = false |
constexpr bool | kIsSanitize = false |
constexpr auto | kIsDebug = true |
constexpr auto | kIsLittleEndian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
constexpr auto | kIsBigEndian = !kIsLittleEndian |
constexpr auto | kIsObjC = false |
constexpr auto | kIsMobile = false |
constexpr auto | kIsLinux = false |
constexpr auto | kIsWindows = false |
constexpr auto | kIsGlibcxx = false |
constexpr auto | kIsLibcpp = false |
constexpr auto | kIsLibstdcpp = false |
constexpr auto | kMscVer = 0 |
constexpr auto | kMicrosoftAbiVer = 0 |
constexpr auto | kCpplibVer = 0 |
hazptr_domain< std::atomic > | default_domain |
folly::Indestructible< rcu_domain< RcuTag > * > | rcu_default_domain_ |
static constexpr size_t | kMaxThreadNameLength = 16 |
auto | globalCount = folly::lazy([] { return 0; }) |
auto const | foo |
static FakeAllPowerfulAssertingMutexInternal | globalAllPowerfulAssertingMutex |
constexpr Unit | unit {} |
constexpr initlist_construct_t | initlist_construct {} |
constexpr presorted_t | presorted {} |
constexpr unsorted_t | unsorted {} |
constexpr size_t | kMaxVarintLength32 = 5 |
constexpr size_t | kMaxVarintLength64 = 10 |
—— Concurrent Priority Queue Implementation ——
Conversions between std::chrono types and POSIX time types.
These conversions will fail with a ConversionError if an overflow would occur performing the conversion. (e.g., if the input value cannot fit in the destination type). However they allow loss of precision (e.g., converting nanoseconds to a struct timeval which only has microsecond granularity, or a struct timespec to std::chrono::minutes).
Compression / decompression over IOBufs
Helper functions for compression codecs.
include or backport:
BitIterator Wrapper around an iterator over an integral type that iterates over its underlying bits in MSb to LSb order
findFirstSet(BitIterator begin, BitIterator end) return a BitIterator pointing to the first 1 bit in [begin, end), or end if all bits in [begin, end) are 0
Similar to Python's enumerate(), folly::enumerate() can be used to iterate a range with a for-range loop, and it also allows to retrieve the count of iterations so far.
For example:
for (auto&& it : folly::enumerate(vec)) { // *it is a reference to the current element. Const if vec is const. // it->member can be used as well. // it.index contains the iteration count. }
If the iteration variable is const, the reference is too.
for (const auto&& it : folly::enumerate(vec)) { // *it is always a const reference. }
F14NodeMap, F14ValueMap, and F14VectorMap
F14FastMap conditionally inherits from F14ValueMap or F14VectorMap
See F14.md
F14NodeSet, F14ValueSet, and F14VectorSet
F14FastSet conditionally inherits from F14ValueSet or F14VectorSet
See F14.md
Converts anything to anything, with an emphasis on performance and safety.
Helper functions and templates for FileUtil.cpp. Declared here so they can be unittested.
Discriminated pointer: Type-safe pointer to one of several types.
Similar to boost::variant, but has no space overhead over a raw pointer, as it relies on the fact that (on x86_64) there are 16 unused bits in a pointer.
This is a runtime dynamically typed value. It holds types from a specific predetermined set of types (ints, bools, arrays, etc). In particular, it can be used as a convenient in-memory representation for complete json objects.
In general you can try to use these objects as if they were the type they represent (although in some cases with a slightly less complete interface than the raw type), and it'll just throw a TypeError if it is used in an illegal way.
Some examples:
dynamic twelve = 12; dynamic str = "string"; dynamic map = dynamic::object; map[str] = twelve; map[str + "another_str"] = dynamic::array("array", "of", 4, "elements"); map.insert("null_element", nullptr); ++map[str]; assert(map[str] == 13);
// Building a complex object with a sub array inline: dynamic d = dynamic::object ("key", "value") ("key2", dynamic::array("a", "array")) ;
Also see folly/json.h for the serialization and deserialization functions for JSON.
Additional documentation is in folly/docs/Dynamic.md.
convertTo returns a well-typed representation of the input dynamic.
Example:
dynamic d = dynamic::array( dynamic::array(1, 2, 3), dynamic::array(4, 5)); // a vector of vector of int auto vvi = convertTo<fbvector<fbvector<int>>>(d);
See docs/DynamicConverter.md for supported types and customization
gcc-4.7 warns about use of uninitialized memory around the use of storage_ even though this is explicitly initialized at each point.
Shared utils for BitVectorCoding.h and EliasFanoCoding.h.
Based on the paper by Sebastiano Vigna, "Quasi-succinct indices" (arxiv:1206.4300).
Validation according to the draft v4 standard: http://json-schema.org/
If your schema is invalid, then it won't validate anything. For example, if you set "type": "invalid_type" in your schema, then it won't check for any type, as if you had left that property out. If you want to make sure your schema is valid, you can optionally validate it first according to the metaschema.
Limitations:
— Overview — — Mound — — Design — — Template Parameters: — — Interface —
Wrappers for different versions of boost::context library API reference for different versions Boost 1.51: http://www.boost.org/doc/libs/1_51_0/libs/context/doc/html/context/context/boost_fcontext.html Boost 1.52: http://www.boost.org/doc/libs/1_52_0/libs/context/doc/html/context/context/boost_fcontext.html Boost 1.56: http://www.boost.org/doc/libs/1_56_0/libs/context/doc/html/context/context/boost_fcontext.html Boost 1.61: https://github.com/boostorg/context/blob/boost-1.61.0/include/boost/context/detail/fcontext.hpp
Compute 64-, 96-, and 128-bit Rabin fingerprints, as described in Michael O. Rabin (1981) Fingerprinting by Random Polynomials Center for Research in Computing Technology, Harvard University Tech Report TR-CSE-03-01
The implementation follows the optimization described in Andrei Z. Broder (1993) Some applications of Rabin's fingerprinting method
extended for fingerprints larger than 64 bits, and modified to use 64-bit instead of 32-bit integers for computation.
The precomputed tables are in Fingerprint.cpp.
Benchmarked on 10/13/2009 on a 2.5GHz quad-core Xeon L5420,
include or backport:
Generator-based Sequence Comprehensions in C++, akin to C#'s LINQ
This library makes it possible to write declarative comprehensions for processing sequences of values efficiently in C++. The operators should be familiar to those with experience in functional programming, and the performance will be virtually identical to the equivalent, boilerplate C++ implementations.
Generator objects may be created from either an stl-like container (anything supporting begin() and end()), from sequences of values, or from another generator (see below). To create a generator that pulls values from a vector, for example, one could write:
vector<string> names { "Jack", "Jill", "Sara", "Tom" }; auto gen = from(names);
Generators are composed by building new generators out of old ones through the use of operators. These are reminiscent of shell pipelines, and afford similar composition. Lambda functions are used liberally to describe how to handle individual values:
auto lengths = gen | mapped([](const fbstring& name) { return name.size(); });
Generators are lazy; they don't actually perform any work until they need to. As an example, the 'lengths' generator (above) won't actually invoke the provided lambda until values are needed:
auto lengthVector = lengths | as<std::vector>(); auto totalLength = lengths | sum;
'auto' is useful in here because the actual types of the generators objects are usually complicated and implementation-sensitive.
If a simpler type is desired (for returning, as an example), VirtualGen<T> may be used to wrap the generator in a polymorphic wrapper:
VirtualGen<float> powersOfE() { return seq(1) | mapped(&expf); }
To learn more about this library, including the use of infinite generators, see the examples in the comments, or the docs (coming soon).
Cursor class for fast iteration over IOBuf chains.
Cursor - Read-only access
RWPrivateCursor - Read-write access, assumes private access to IOBuf chain RWUnshareCursor - Read-write access, calls unshare on write (COW) Appender - Write access, assumes private access to IOBuf chain
Note that RW cursors write in the preallocated part of buffers (that is, between the buffer's data() and tail()), while Appenders append to the end of the buffer (between the buffer's tail() and bufferEnd()). Appenders automatically adjust the buffer pointers, so you may only use one Appender with a buffer chain; for this reason, Appenders assume private access to the buffer (you need to call unshare() yourself if necessary).
Serialize and deserialize folly::dynamic values as JSON.
Before you use this you should probably understand the basic concepts in the JSON type system:
Value : String | Bool | Null | Object | Array | Number String : UTF-8 sequence Object : (String, Value) pairs, with unique String keys Array : ordered list of Values Null : null Bool : true | false Number : (representation unspecified)
... That's about it. For more information see http://json.org or look up RFC 4627.
If your dynamic has anything illegal with regard to this type system, the serializer will throw.
Various low-level, bit-manipulation routines.
findFirstSet(x) [constexpr] find first (least significant) bit set in a value of an integral type, 1-based (like ffs()). 0 = no bits are set (x == 0)
findLastSet(x) [constexpr] find last (most significant) bit set in a value of an integral type, 1-based. 0 = no bits are set (x == 0) for x != 0, findLastSet(x) == 1 + floor(log2(x))
nextPowTwo(x) [constexpr] Finds the next power of two >= x.
isPowTwo(x) [constexpr] return true iff x is a power of two
popcount(x) return the number of 1 bits in x
Endian convert between native, big, and little endian representation Endian::big(x) big <-> native Endian::little(x) little <-> native Endian::swap(x) big <-> little
Some arithmetic functions that seem to pop up or get hand-rolled a lot. So far they are all focused on integer division.
folly implementation of std::overload
like functionality
Example: struct One {}; struct Two {}; boost::variant<One, Two> value;
variant_match(value, [] (const One& one) { ... }, [] (const Two& two) { ... });
Code that aids in storing data aligned on block (possibly cache-line) boundaries, perhaps with padding.
Class Node represents one block. Given an iterator to a container of Node, class Iterator encapsulates an iterator to the underlying elements. Adaptor converts a sequence of Node into a sequence of underlying elements (not fully compatible with STL container requirements, see comments near the Node class declaration).
An instance of Replaceable<T>
wraps an instance of T
.
You access the inner T
instance with operator*
and operator->
(as if it were a smart pointer).
Replaceable<T>
adds no indirection cost and performs no allocations.
Replaceable<T>
has the same size and alignment as T
.
You can replace the T
within a Replaceable<T>
using the emplace
method (presuming that it is constructible and destructible without throwing exceptions). If the destructor or constructor you're using could throw an exception you should use Optional<T>
instead, as it's not a logic error for that to be empty.
If a T
instance contains const
-qualified member variables or reference member variables we can't safely replace a T
instance by destructing it manually and using placement new. This is because compilers are permitted to assume that the const
or reference members of a named, referenced, or pointed-to object do not change.
For pointed-to objects in allocated storage you can use the pointer returned by placement new or use the launder
function to get a pointer to the new object. Note that launder
doesn't affect its argument, it's still undefined behaviour to use the original pointer. And none of this helps if the object is a local or a member variable because the destructor call will not have been laundered. In summary, this is the only way to use placement new that is both simple and safe:
T* pT = new T(...); pT->~T(); pT = ::new (pT) T(...); delete pT;
T
to de-const
and -reference
the members of T
.T
harder to reason aboutT
methodsT
on the heap and use a raw/unique/shared pointer.T
in an Optional
.There is a potential performance penalty after converting T
to Replaceable<T>
if you have non-T
-member-function code which repeatedly examines the value of a const
or reference
data member of T
, because the compiler now has to look at the value each time whereas previously it was permitted to load it once up-front and presume that it could never change.
Don't store a reference to the T
within a Replaceable<T>
unless you can show that its lifetime does not cross an emplace
call. For safety a reasonable rule is to always use operator*()
to get a fresh temporary each time you need a `T&.
If you store a pointer to the T
within a Replaceable<T>
you must launder it after each call to emplace
before using it. Again you can reasonably choose to always use operator->()
to get a fresh temporary each time you need a `T*.
Thus far I haven't thought of a good reason to use Replaceable<T>
or Replaceable<T> const&
as a function parameter type.
Replaceable<T>&
can make sense to pass to a function that conditionally replaces the T
, where T
has const
or reference member variables.
The main use of Replaceable<T>
is as a class member type or a local type in long-running functions.
It's probably time to rethink your design choices if you end up with Replaceable<Replaceable<T>>
, Optional<Replaceable<T>>
, Replaceable<Optional<T>>
, unique_ptr<Replaceable<T>>
etc. except as a result of template expansion.
Subprocess library, modeled after Python's subprocess module (http://docs.python.org/2/library/subprocess.html)
This library defines one class (Subprocess) which represents a child process. Subprocess has two constructors: one that takes a vector<string> and executes the given executable without using the shell, and one that takes a string and executes the given command using the shell. Subprocess allows you to redirect the child's standard input, standard output, and standard error to/from child descriptors in the parent, or to create communication pipes between the child and the parent.
The simplest example is a thread-safe [1] version of the system() library function: Subprocess(cmd).wait(); which executes the command using the default shell and waits for it to complete, returning the exit status.
A thread-safe [1] version of popen() (type="r", to read from the child): Subprocess proc(cmd, Subprocess::Options().pipeStdout()); // read from proc.stdoutFd() proc.wait();
A thread-safe [1] version of popen() (type="w", to write to the child): Subprocess proc(cmd, Subprocess::Options().pipeStdin()); // write to proc.stdinFd() proc.wait();
If you want to redirect both stdin and stdout to pipes, you can, but note that you're subject to a variety of deadlocks. You'll want to use nonblocking I/O, like the callback version of communicate().
The string or IOBuf-based variants of communicate() are the simplest way to communicate with a child via its standard input, standard output, and standard error. They buffer everything in memory, so they are not great for large amounts of data (or long-running processes), but they are much simpler than the callback version.
== A note on thread-safety ==
[1] "thread-safe" refers ONLY to the fact that Subprocess is very careful to fork in a way that does not cause grief in multithreaded programs.
Caveat: If your system does not have the atomic pipe2 system call, it is not safe to concurrently call Subprocess from different threads. Therefore, it is best to have a single thread be responsible for spawning subprocesses.
A particular instances of Subprocess is emphatically not thread-safe. If you need to simultaneously communicate via the pipes, and interact with the Subprocess state, your best bet is to:
The current implementation of communicate() cannot be safely interrupted. To do so correctly, one would need to use EventFD, or open a dedicated pipe to be messaged from a different thread – in particular, kill() will not do, since a descendant may keep the pipes open indefinitely.
So, once you call communicate(), you must wait for it to return, and not touch the pipes from other threads. closeParentFd() is emphatically unsafe to call concurrently, and even sendSignal() is not a good idea. You can perhaps give the Subprocess's PID to a different thread before starting communicate(), and use that PID to send a signal without accessing the Subprocess object. In that case, you will need a mutex that ensures you don't wait() before you sent said signal. In a nutshell, don't do this.
In fact, signals are inherently concurrency-unsafe on Unix: if you signal a PID, while another thread is in waitpid(), the signal may fire either before or after the process is reaped. This means that your signal can, in pathological circumstances, be delivered to the wrong process (ouch!). To avoid this, you should only use non-blocking waits (i.e. poll()), and make sure to serialize your signals (i.e. kill()) with the waits – either wait & signal from the same thread, or use a mutex.
Classes related to hazard pointer domains.
Classes related to objects protected by hazard pointers.
Classes related to link counted objects and automatic retirement.
Raw node storage is preallocated in a contiguous memory segment, but we use an anonymous mmap so the physical memory used (RSS) will only reflect the maximum number of waiters that actually existed concurrently. For blocked threads the max node count is limited by the number of threads, so we can conservatively estimate that this will be < 10k. For LifoEventSem, however, we could potentially have many more.
On a 64-bit architecture each LifoSemRawNode takes 16 bytes. We make the pool 1 million entries.
This module implements a Synchronized abstraction useful in mutex-based concurrency.
The Synchronized<T, Mutex> class is the primary public API exposed by this module. See folly/docs/Synchronized.md for a more complete explanation of this class and its benefits.
Shell
provides a collection of functions to use with Subprocess
that make it easier to safely run processes in a unix shell.
Note: use this rarely and carefully. By default you should use Subprocess
with a vector of arguments.
============================================================================
SmallFunctionFunctionPointerInvoke 3.02ns 331.34M SmallFunctionStdFunctionInvoke 3.02ns 331.34M SmallFunctionStdFunctionWithReferenceWrapperInv 3.02ns 331.33M SmallFunctionFollyFunctionInvoke 3.02ns 331.30M
SmallFunctionFunctionPointerCreateInvoke 3.02ns 331.34M SmallFunctionStdFunctionCreateInvoke 3.76ns 266.24M SmallFunctionStdFunctionReferenceWrapperCreateI 4.77ns 209.52M SmallFunctionFollyFunctionCreateInvoke 3.24ns 308.40M
BigFunctionStdFunctionInvoke 3.02ns 330.74M BigFunctionStdFunctionReferenceWrapperInvoke 3.02ns 330.74M BigFunctionFollyFunctionInvoke 3.02ns 331.31M
BigFunctionStdFunctionCreateInvoke 43.87ns 22.79M BigFunctionStdFunctionReferenceWrapperCreateInv 4.20ns 238.22M BigFunctionFollyFunctionCreateInvoke 43.01ns 23.25M
Higher performance (up to 10x) atomic increment using thread caching.
Improved thread local storage for non-trivial types (similar speed as pthread_getspecific but only consumes a single pthread_key_t, and 4x faster than boost::thread_specific_ptr).
Also includes an accessor interface to walk all the thread local child objects of a parent. accessAllThreads() initializes an accessor which holds a global lock that blocks all creation and destruction of ThreadLocal objects with the same Tag and can be used as an iterable container. accessAllThreads() can race with destruction of thread-local elements. We provide a strict mode which is dangerous because it requires the access lock to be held while destroying thread-local elements which could cause deadlocks. We gate this mode behind the AccessModeStrict template parameter.
Intended use is for frequent write, infrequent read data access patterns such as counters.
There are two classes here - ThreadLocal and ThreadLocalPtr. ThreadLocalPtr has semantics similar to boost::thread_specific_ptr. ThreadLocal is a thin wrapper around ThreadLocalPtr that manages allocation automatically.
Simple timeout queue. Call user-specified callbacks when their timeouts expire.
This class assumes that "time" is an int64_t and doesn't care about time units (seconds, milliseconds, etc). You call runOnce() / runLoop() using the same time units that you use to specify callbacks.
typedef std::unique_ptr<int> folly::A |
Definition at line 26 of file ThenCompileTest.h.
using folly::aligned_hazptr_holder = typedef typename std::aligned_storage< sizeof(hazptr_holder<Atom>), alignof(hazptr_holder<Atom>)>::type |
Type used by hazptr_array and hazptr_local.
Definition at line 199 of file HazptrHolder.h.
using folly::apply_result_t = typedef invoke_result_t<ApplyInvoke, F, Tuple> |
Definition at line 126 of file ApplyTuple.h.
using folly::ArenaAllocator = typedef CxxAllocatorAdaptor<T, Arena<Alloc>> |
using folly::atomic_uint_fast_wait_t = typedef std::atomic<std::uint32_t> |
Definition at line 63 of file AtomicNotification.h.
using folly::AtomicUnorderedInsertMap64 = typedef AtomicUnorderedInsertMap< Key, Value, Hash, KeyEqual, SkipKeyValueDeletion, Atom, uint64_t, Allocator> |
AtomicUnorderedInsertMap64 is just a type alias that makes it easier to select a 64 bit slot index type. Use this if you need a capacity bigger than 2^30 (about a billion). This increases memory overheads, obviously.
Definition at line 493 of file AtomicUnorderedMap.h.
using folly::back_emplace_iterator = typedef detail:: emplace_iterator_impl<detail::EmplaceBack, Container, implicit_unpack> |
Behaves just like std::back_insert_iterator except that it calls emplace_back() instead of insert(). Uses perfect forwarding.
Definition at line 433 of file Iterator.h.
using folly::BasicStringKeyedUnorderedSet = typedef F14NodeSet<std::string, Hash, Eq, Alloc> |
Definition at line 27 of file StringKeyedUnorderedSet.h.
typedef function<detail::TimeIterPair(unsigned int)> folly::BenchmarkFun |
Definition at line 73 of file Benchmark.cpp.
using folly::bool_constant = typedef std::integral_constant<bool, B> |
typedef std::array<uint8_t, 16> folly::ByteArray16 |
Specialization for IPv6 addresses
Definition at line 50 of file IPAddressV6.h.
typedef std::array<uint8_t, 4> folly::ByteArray4 |
Specialization for IPv4 addresses
Definition at line 46 of file IPAddressV4.h.
typedef Range<const unsigned char*> folly::ByteRange |
typedef std::pair<IPAddressV4, uint8_t> folly::CIDRNetworkV4 |
Pair of IPAddressV4, netmask
Definition at line 36 of file IPAddressV4.h.
typedef std::pair<IPAddressV6, uint8_t> folly::CIDRNetworkV6 |
Pair of IPAddressV6, netmask
Definition at line 40 of file IPAddressV6.h.
using folly::coarse_stop_watch = typedef custom_stop_watch<folly::chrono::coarse_steady_clock, Duration> |
A type alias for custom_stop_watch
that uses a coarse monotonic clock as the time source. Refer to the documentation of custom_stop_watch
for full documentation.
Arguments:
Example:
coarse_stop_watch<std::chrono::seconds> watch; do_something(); std::cout << "time elapsed: " << watch.elapsed().count() << std::endl;
Definition at line 284 of file stop_watch.h.
using folly::Cob = typedef Func |
Definition at line 54 of file EventBase.h.
using folly::CountedIntrusiveList = typedef boost::intrusive::list< T, boost::intrusive::member_hook<T, SafeIntrusiveListHook, PtrToMember>, boost::intrusive::constant_time_size<true>> |
An intrusive list with const-time size() method.
A CountedIntrusiveList always uses a safe-link hook. CountedIntrusiveList::size() is an O(1) operation. Users of this type of lists need to remove a member from a list by calling one of the methods on the list (e.g., erase(), pop_front(), etc.), rather than calling unlink on the member's list hook. Given references to a list and a member, a constant-time removal operation can be accomplished by list.erase(list.iterator_to(member)). Also, when a member is destroyed, it is NOT automatically removed from the list.
Example usage:
class Foo { // Note that the listHook member variable needs to be visible // to the code that defines the CountedIntrusiveList instantiation. // The list hook can be made public, or you can make the other class a // friend. SafeIntrusiveListHook listHook; };
using FooList = CountedIntrusiveList<Foo, &Foo::listHook> FooList;
Foo *foo = new Foo(); FooList myList; myList.push_back(*foo); myList.pop_front();
Note that each SafeIntrusiveListHook can only be part of a single list at any given time. If you need the same object to be stored in two lists at once, you need to use two different SafeIntrusiveListHook member variables.
The elements stored in the list must contain an SafeIntrusiveListHook member variable.
Definition at line 116 of file IntrusiveList.h.
using folly::CountPair = typedef std::pair<int, int> |
Definition at line 161 of file SynchronizedTest.cpp.
using folly::DefaultRefCount = typedef TLRefCount |
Definition at line 34 of file ReadMostlySharedPtr.h.
using folly::DistributedMutex = typedef detail::distributed_mutex::DistributedMutex<> |
Bring the default instantiation of DistributedMutex into the folly namespace without requiring any template arguments for public usage
Definition at line 187 of file DistributedMutex.h.
using folly::DMPMCQueue = typedef DynamicBoundedQueue< T, false, false, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom> |
DMPMCQueue
Definition at line 737 of file DynamicBoundedQueue.h.
using folly::DMPSCQueue = typedef DynamicBoundedQueue< T, false, true, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom> |
DMPSCQueue
Definition at line 701 of file DynamicBoundedQueue.h.
using folly::drop_unit_t = typedef typename drop_unit<T>::type |
using folly::DSPMCQueue = typedef DynamicBoundedQueue< T, true, false, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom> |
DSPMCQueue
Definition at line 719 of file DynamicBoundedQueue.h.
using folly::DSPSCQueue = typedef DynamicBoundedQueue< T, true, true, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom> |
using folly::Duration = typedef std::chrono::milliseconds |
folly::Duration is an alias for the best resolution we offer/work with. However, it is not intended to be used for client code - you should use a descriptive std::chrono::duration type instead. e.g. do not write this:
futures::sleep(Duration(1000))...
rather this:
futures::sleep(std::chrono::milliseconds(1000));
or this:
futures::sleep(std::chrono::seconds(1));
using folly::DynamicTokenBucket = typedef BasicDynamicTokenBucket<> |
Definition at line 376 of file TokenBucket.h.
using folly::emplace_iterator = typedef detail::emplace_iterator_impl<detail::Emplace, Container, implicit_unpack> |
Behaves just like std::insert_iterator except that it calls emplace() instead of insert(). Uses perfect forwarding.
Definition at line 409 of file Iterator.h.
using folly::EnableIfFuture = typedef typename std::enable_if<isFuture<T>::value>::type |
Definition at line 30 of file ThenCompileTest.h.
using folly::EnableUnlessFuture = typedef typename std::enable_if<!isFuture<T>::value>::type |
Definition at line 33 of file ThenCompileTest.h.
using folly::EventSetCallback = typedef void (*)(libevent_fd_t, short, void*) |
using folly::ExpectedErrorType = typedef typename std::remove_reference<Expected>::type::error_type |
Alias for an Expected type's assiciated error_type
Definition at line 96 of file Expected.h.
using folly::ExpectedValueType = typedef typename std::remove_reference<Expected>::type::value_type |
Alias for an Expected type's assiciated value_type
Definition at line 89 of file Expected.h.
Definition at line 190 of file CacheLocality.h.
typedef basic_fbstring<char> folly::fbstring |
Definition at line 2904 of file FBString.h.
using folly::FixedString = typedef BasicFixedString<char, N> |
Definition at line 45 of file FixedString.h.
using folly::front_emplace_iterator = typedef detail:: emplace_iterator_impl<detail::EmplaceFront, Container, implicit_unpack> |
Behaves just like std::front_insert_iterator except that it calls emplace_front() instead of insert(). Uses perfect forwarding.
Definition at line 425 of file Iterator.h.
using folly::Func = typedef Function<void()> |
Definition at line 27 of file Executor.h.
using folly::hint_emplace_iterator = typedef detail:: emplace_iterator_impl<detail::EmplaceHint, Container, implicit_unpack> |
Behaves just like std::insert_iterator except that it calls emplace_hint() instead of insert(). Uses perfect forwarding.
Definition at line 417 of file Iterator.h.
typedef std::vector<HugePageSize> folly::HugePageSizeVec |
Vector of (huge_page_size, mount_point), sorted by huge_page_size. mount_point might be empty if no hugetlbfs file system is mounted for that size.
Definition at line 59 of file HugePages.h.
using folly::Ignored = typedef Ignore |
using folly::in_place_index_t = typedef in_place_index_tag<I> (&)(in_place_index_tag<I>) |
using folly::in_place_t = typedef in_place_tag (&)(in_place_tag) |
using folly::in_place_type_t = typedef in_place_type_tag<T> (&)(in_place_type_tag<T>) |
using folly::index_constant = typedef std::integral_constant<std::size_t, I> |
using folly::index_sequence = typedef integer_sequence<std::size_t, Ints...> |
using folly::index_sequence_for = typedef make_index_sequence<sizeof...(T)> |
using folly::index_sequence_for_tuple = typedef make_index_sequence<std::tuple_size<Tuple>::value> |
Helper to generate an index sequence from a tuple like type
Definition at line 36 of file ApplyTuple.h.
using folly::IndexedMemPoolTraitsEagerRecycle = typedef IndexedMemPoolTraits<T, true, true> |
IndexedMemPool traits that implements the eager lifecycle strategy. In this strategy elements are constructed when they are allocated from the pool and destroyed when recycled.
Definition at line 100 of file IndexedMemPool.h.
using folly::IndexedMemPoolTraitsLazyRecycle = typedef IndexedMemPoolTraits<T, false, false> |
IndexedMemPool traits that implements the lazy lifecycle strategy. In this strategy elements are default-constructed the first time they are allocated, and destroyed when the pool itself is destroyed.
Definition at line 94 of file IndexedMemPool.h.
using folly::IntrusiveList = typedef boost::intrusive::list< T, boost::intrusive::member_hook<T, IntrusiveListHook, PtrToMember>, boost::intrusive::constant_time_size<false>> |
An intrusive list.
An IntrusiveList always uses an auto-unlink hook. Beware that IntrusiveList::size() is an O(n) operation, since it has to walk the entire list.
Example usage:
class Foo { // Note that the listHook member variable needs to be visible // to the code that defines the IntrusiveList instantiation. // The list hook can be made public, or you can make the other class a // friend. IntrusiveListHook listHook; };
using FooList = IntrusiveList<Foo, &Foo::listHook>;
Foo *foo = new Foo(); FooList myList; myList.push_back(*foo);
Note that each IntrusiveListHook can only be part of a single list at any given time. If you need the same object to be stored in two lists at once, you need to use two different IntrusiveListHook member variables.
The elements stored in the list must contain an IntrusiveListHook member variable.
Definition at line 68 of file IntrusiveList.h.
using folly::IntrusiveListHook = typedef boost::intrusive::list_member_hook< boost::intrusive::link_mode<boost::intrusive::auto_unlink>> |
An auto-unlink intrusive list hook.
Definition at line 32 of file IntrusiveList.h.
using folly::invoke_result_t = typedef typename invoke_result<F, Args...>::type |
using folly::is_trivially_copyable = typedef std::is_trivially_copyable<T> |
using folly::IsOneOf = typedef StrictDisjunction<std::is_same<T, Ts>...> |
using folly::libevent_fd_t = typedef int |
typedef LifoSemImpl folly::LifoSem |
LifoSem is a semaphore that wakes its waiters in a manner intended to maximize performance rather than fairness. It should be preferred to a mutex+condvar or POSIX sem_t solution when all of the waiters are equivalent. It is faster than a condvar or sem_t, and it has a shutdown state that might save you a lot of complexity when it comes time to shut down your work pipelines. LifoSem is larger than sem_t, but that is only because it uses padding and alignment to avoid false sharing.
LifoSem allows multi-post and multi-tryWait, and provides a shutdown state that awakens all waiters. LifoSem is faster than sem_t because it performs exact wakeups, so it often requires fewer system calls. It provides all of the functionality of sem_t except for timed waiting. It is called LifoSem because its wakeup policy is approximately LIFO, rather than the usual FIFO.
The core semaphore operations provided are:
– post() – if there is a pending waiter, wake it up, otherwise increment the value of the semaphore. If the value of the semaphore is already 2^32-1, does nothing. Compare to sem_post().
– post(n) – equivalent to n calls to post(), but much more efficient. sem_t has no equivalent to this method.
– bool tryWait() – if the semaphore's value is positive, decrements it and returns true, otherwise returns false. Compare to sem_trywait().
– uint32_t tryWait(uint32_t n) – attempts to decrement the semaphore's value by n, returning the amount by which it actually was decremented (a value from 0 to n inclusive). Not atomic. Equivalent to n calls to tryWait(). sem_t has no equivalent to this method.
– wait() – waits until tryWait() can succeed. Compare to sem_wait().
– timed wait variants - will wait until timeout. Note when these timeout, the current implementation takes a lock, blocking concurrent pushes and pops. (If timed wait calls are substantial, consider re-working this code to be lock-free).
LifoSem also has the notion of a shutdown state, in which any calls that would block (or are already blocked) throw ShutdownSemError. Note the difference between a call to wait() and a call to wait() that might block. In the former case tryWait() would succeed, and no isShutdown() check is performed. In the latter case an exception is thrown. This behavior allows a LifoSem controlling work distribution to drain. If you want to immediately stop all waiting on shutdown, you can just check isShutdown() yourself (preferrably wrapped in an UNLIKELY). This fast-stop behavior is easy to add, but difficult to remove if you want the draining behavior, which is why we have chosen the former.
All LifoSem operations except valueGuess() are guaranteed to be linearizable.
using folly::lift_unit_t = typedef typename lift_unit<T>::type |
using folly::like_t = typedef typename detail::like_<Src>::template apply<remove_cvref_t<Dst>> |
using folly::LPtr = typedef LockedPtr<Synchronized<int>, LockPolicy> |
Definition at line 771 of file SynchronizedTest.cpp.
using folly::make_index_sequence = typedef make_integer_sequence<std::size_t, Size> |
using folly::make_integer_sequence = typedef typename utility_detail::make_seq< Size>::template apply<integer_sequence<T>, integer_sequence<T, 0>> |
using folly::MaybeTryArg = typedef typename std:: conditional<is_invocable<F, T&&, Try<ItT>&&>::value, Try<ItT>, ItT>::type |
typedef MicroLockBase folly::MicroLock |
Definition at line 233 of file MicroLock.h.
using folly::monotonic_clock = typedef std::chrono::steady_clock |
Definition at line 28 of file stop_watch.h.
using folly::MoveOnly = typedef moveonly_::MoveOnly |
typedef std::lock_guard<MicroSpinLock> folly::MSLGuard |
Definition at line 160 of file MicroSpinLock.h.
typedef Range<unsigned char*> folly::MutableByteRange |
typedef Range<char*> folly::MutableStringPiece |
using folly::MutexLevelValue = typedef detail::MutexLevelValueImpl< true, LockTraits<Mutex>::is_shared, LockTraits<Mutex>::is_upgrade> |
Public version of LockInterfaceDispatcher that contains the MutexLevel enum for the passed in mutex type
This is decoupled from MutexLevelValueImpl in LockTraits.h because this ensures that a heterogenous mutex with a different API can be used. For example - if a mutex does not have a lock_shared() method but the LockTraits specialization for it supports a static non member lock_shared(Mutex&) it can be used as a shared mutex and will provide rlock() and wlock() functions.
Definition at line 66 of file Synchronized.h.
using folly::once_flag = typedef basic_once_flag<SharedMutex> |
Definition at line 109 of file CallOnce.h.
using folly::PolyDecay = typedef detail::MetaQuote<std::decay_t> |
using folly::PolyMembers = typedef detail::TypeList<Ts...> |
A list of member function bindings.
Definition at line 71 of file PolyDetail.h.
using folly::PolySelf = typedef decltype(Access::template self_<Node, Tfx>()) |
Within the definition of interface I
, PolySelf<Base>
is an alias for the instance of Poly
that is currently being instantiated. It is one of: Poly<J>
, Poly<J&&>
, Poly<J&>
, or Poly<J const&>
; where J
is either I
or some interface that extends I
.
It can be used within interface definitions to declare members that accept other Poly
objects of the same type as *this
.
The first parameter may optionally be cv- and/or reference-qualified, in which case, the qualification is applies to the type of the interface in the resulting Poly<>
instance. The second template parameter controls whether or not the interface is decayed before the cv-ref qualifiers of the first argument are applied. For example, given the following:
struct Foo { template <class Base> struct Interface : Base { using A = PolySelf<Base>; using B = PolySelf<Base &>; using C = PolySelf<Base const &>; using X = PolySelf<Base, PolyDecay>; using Y = PolySelf<Base &, PolyDecay>; using Z = PolySelf<Base const &, PolyDecay>; }; // ... }; struct Bar : PolyExtends<Foo> { // ... };
Then for Poly<Bar>
, the typedefs are aliases for the following types:
A
is Poly<Bar>
B
is Poly<Bar &>
C
is Poly<Bar const &>
X
is Poly<Bar>
Y
is Poly<Bar &>
Z
is Poly<Bar const &>
And for Poly<Bar &>
, the typedefs are aliases for the following types:
using folly::QuadraticProbingAtomicHashMap = typedef AtomicHashMap< KeyT, ValueT, HashFcn, EqualFcn, Allocator, AtomicHashArrayQuadraticProbeFcn> |
Definition at line 497 of file AtomicHashMap.h.
using folly::rcu_reader = typedef rcu_reader_domain<RcuTag> |
using folly::remove_cvref_t = typedef typename remove_cvref<T>::type |
using folly::SafeIntrusiveListHook = typedef boost::intrusive::list_member_hook< boost::intrusive::link_mode<boost::intrusive::safe_link>> |
A safe-link intrusive list hook.
Definition at line 74 of file IntrusiveList.h.
Definition at line 1511 of file SharedMutex.h.
typedef SharedMutexImpl<true> folly::SharedMutexReadPriority |
Definition at line 1509 of file SharedMutex.h.
typedef SharedMutexImpl<false, void, std::atomic, false, false> folly::SharedMutexSuppressTSAN |
Definition at line 1513 of file SharedMutex.h.
typedef SharedMutexImpl<false> folly::SharedMutexWritePriority |
Definition at line 1510 of file SharedMutex.h.
Definition at line 79 of file SpinLock.h.
typedef std::shared_ptr<SSLContext> folly::SSLContextPtr |
Definition at line 628 of file SSLContext.h.
using folly::stop_watch = typedef custom_stop_watch<std::chrono::steady_clock, Duration> |
A type alias for custom_stop_watch
that uses a monotonic clock as the time source. Refer to the documentation of custom_stop_watch
for full documentation.
Arguments:
Example:
stop_watch<std::chrono::seconds> watch; do_something(); std::cout << "time elapsed: " << watch.elapsed().count() << std::endl;
Definition at line 304 of file stop_watch.h.
using folly::StringKeyedSet = typedef StringKeyedSetBase<> |
Definition at line 191 of file StringKeyedSet.h.
using folly::StringKeyedUnorderedSet = typedef BasicStringKeyedUnorderedSet<> |
Definition at line 29 of file StringKeyedUnorderedSet.h.
typedef Range< const char * > folly::StringPiece |
Definition at line 29 of file ScopedEventBaseThread.h.
using folly::SynchronizedTestTypes = typedef testing::Types< folly::SharedMutexReadPriority, folly::SharedMutexWritePriority, std::mutex, std::recursive_mutex, boost::mutex, boost::recursive_mutex, boost::shared_mutex, folly::SpinLock> |
Definition at line 58 of file SynchronizedTest.cpp.
using folly::SynchronizedTimedTestTypes = typedef testing::Types< folly::SharedMutexReadPriority, folly::SharedMutexWritePriority> |
Definition at line 125 of file SynchronizedTest.cpp.
using folly::SynchronizedTimedWithConstTestTypes = typedef testing::Types< folly::SharedMutexReadPriority, folly::SharedMutexWritePriority> |
Definition at line 148 of file SynchronizedTest.cpp.
using folly::SyncVecThreadPoolExecutors = typedef folly::Synchronized<std::vector<ThreadPoolExecutor*>> |
Definition at line 25 of file ThreadPoolExecutor.cpp.
using folly::SysArenaAllocator = typedef ArenaAllocator<T, SysAllocator<void>> |
using folly::SysBufferUniquePtr = typedef std::unique_ptr<void, SysBufferDeleter> |
using folly::ThreadCachedArenaAllocator = typedef CxxAllocatorAdaptor<T, ThreadCachedArena> |
Definition at line 88 of file ThreadCachedArena.h.
using folly::TokenBucket = typedef BasicTokenBucket<> |
Definition at line 375 of file TokenBucket.h.
using folly::type_t = typedef typename traits_detail::type_t_<T, Ts...>::type |
using folly::UMPMCQueue = typedef UnboundedQueue<T, false, false, MayBlock, LgSegmentSize, LgAlign, Atom> |
Definition at line 883 of file UnboundedQueue.h.
using folly::UMPSCQueue = typedef UnboundedQueue<T, false, true, MayBlock, LgSegmentSize, LgAlign, Atom> |
Definition at line 865 of file UnboundedQueue.h.
using folly::unexpected_t = typedef expected_detail::UnexpectedTag (&)(expected_detail::UnexpectedTag) |
Definition at line 654 of file Expected.h.
using folly::USPMCQueue = typedef UnboundedQueue<T, true, false, MayBlock, LgSegmentSize, LgAlign, Atom> |
Definition at line 874 of file UnboundedQueue.h.
using folly::USPSCQueue = typedef UnboundedQueue<T, true, true, MayBlock, LgSegmentSize, LgAlign, Atom> |
Definition at line 856 of file UnboundedQueue.h.
using folly::UTF8StringPiece = typedef UTF8Range<const char*> |
Definition at line 46 of file UTF8String.h.
using folly::void_t = typedef type_t<void, Ts...> |
|
strong |
Defines a special acquisition method for constructing fbstring objects. AcquireMallocatedString means that the user passes a pointer to a malloc-allocated string that the fbstring object will take into custody.
Definition at line 221 of file FBString.h.
|
strong |
Enumerator | |
---|---|
NORMAL | |
EXPEDITED |
Definition at line 25 of file AsymmetricMemoryBarrier.h.
|
strong |
|
strong |
Wraps error from parsing IP/MASK string
Enumerator | |
---|---|
INVALID_DEFAULT_CIDR | |
INVALID_IP_SLASH_CIDR | |
INVALID_IP | |
INVALID_CIDR | |
CIDR_MISMATCH |
Definition at line 35 of file IPAddressException.h.
|
strong |
Enumerator | |
---|---|
BYTES_BEFORE_COMPRESSION | |
BYTES_AFTER_COMPRESSION | |
BYTES_BEFORE_DECOMPRESSION | |
BYTES_AFTER_DECOMPRESSION | |
COMPRESSIONS | |
DECOMPRESSIONS | |
COMPRESSION_MILLISECONDS | |
DECOMPRESSION_MILLISECONDS |
Definition at line 30 of file Counters.h.
|
strong |
|
strong |
Definition at line 53 of file Conv.h.
|
strong |
|
strong |
Enumerator | |
---|---|
E1 | |
E2 |
Definition at line 35 of file ExpectedTest.cpp.
|
strong |
Enumerator | |
---|---|
SECONDS | |
PRETTY |
Definition at line 31 of file AutoTimer.h.
|
strong |
Error codes for non-throwing interface of IPAddress family of functions.
Enumerator | |
---|---|
INVALID_IP | |
UNSUPPORTED_ADDR_FAMILY |
Definition at line 30 of file IPAddressException.h.
|
strong |
Log level values.
Higher levels are more important than lower ones.
However, the numbers in the DBG* and INFO* level names are reversed, and can be thought of as debug verbosity levels. Increasing DBG* numbers mean increasing level of verbosity. DBG0 is the least verbose debug level, DBG1 is one level higher of verbosity, etc.
Definition at line 38 of file LogLevel.h.
|
strong |
Enumerator | |
---|---|
lt | |
eq | |
gt |
Definition at line 21 of file Ordering.h.
|
strong |
enum folly::PrettyType |
A pretty-printer for numbers that appends suffixes of units of the given type. It prints 4 sig-figs of value with the most appropriate unit.
If `addSpace' is true, we put a space between the units suffix and the value.
Current types are: PRETTY_TIME - s, ms, us, ns, etc. PRETTY_TIME_HMS - h, m, s, ms, us, ns, etc. PRETTY_BYTES_METRIC - kB, MB, GB, etc (goes up by 10^3 = 1000 each time) PRETTY_BYTES - kB, MB, GB, etc (goes up by 2^10 = 1024 each time) PRETTY_BYTES_IEC - KiB, MiB, GiB, etc PRETTY_UNITS_METRIC - k, M, G, etc (goes up by 10^3 = 1000 each time) PRETTY_UNITS_BINARY - k, M, G, etc (goes up by 2^10 = 1024 each time) PRETTY_UNITS_BINARY_IEC - Ki, Mi, Gi, etc PRETTY_SI - full SI metric prefixes from yocto to Yotta http://en.wikipedia.org/wiki/Metric_prefix
Definition at line 314 of file String.h.
|
strong |
Enumerator | |
---|---|
GFLAGS | |
GNU |
Definition at line 26 of file ProgramOptions.h.
|
strong |
Enumerator | |
---|---|
THROW | |
BLOCK |
Definition at line 32 of file BlockingQueue.h.
|
strong |
Enumerator | |
---|---|
CLIENT_RENEGOTIATION | |
INVALID_RENEGOTIATION | |
EARLY_WRITE | |
SSL_ERROR | |
NETWORK_ERROR | |
EOF_ERROR |
Definition at line 22 of file SSLErrors.h.
enum folly::StateEnum |
Enumerator | |
---|---|
STATE_WAITING | |
STATE_SUCCEEDED | |
STATE_FAILED |
Definition at line 45 of file TestSSLServer.h.
|
strong |
Enumerator | |
---|---|
THIS_THREAD | |
ALL_THREADS |
Definition at line 56 of file ThreadLocalDetail.h.
|
strong |
Enumerator | |
---|---|
RetainContinue | |
RemoveContinue | |
RetainBreak | |
RemoveBreak |
Definition at line 128 of file ParkingLot.h.
|
strong |
URI-escape a string. Appends the result to the output string.
Alphanumeric characters and other characters marked as "unreserved" in RFC 3986 ( -_.~ ) are left unchanged. In PATH mode, the forward slash (/) is also left unchanged. In QUERY mode, spaces are replaced by '+'. All other characters are percent-encoded.
Enumerator | |
---|---|
ALL | |
QUERY | |
PATH |
Definition at line 121 of file String.h.
|
strong |
Enumerator | |
---|---|
NONE | |
CORK | |
EOR | |
WRITE_SHUTDOWN | |
WRITE_MSG_ZEROCOPY |
Definition at line 47 of file AsyncTransport.h.
std::tuple<detail::LockedPtrType<Sync1>, detail::LockedPtrType<Sync2> > folly::acquireLocked | ( | Sync1 & | l1, |
Sync2 & | l2 | ||
) |
Acquire locks for multiple Synchronized<T> objects, in a deadlock-safe manner.
The locks are acquired in order from lowest address to highest address. (Note that this is not necessarily the same algorithm used by std::lock().) For parameters that are const and support shared locks, a read lock is acquired. Otherwise an exclusive lock is acquired.
use lock() with folly::wlock(), folly::rlock() and folly::ulock() for arbitrary locking without causing a deadlock (as much as possible), with the same effects as std::lock()
Definition at line 1626 of file Synchronized.h.
References std::tr1::make_tuple(), and folly::gen::move.
Referenced by acquireLockedPair(), folly::RequestContext::setContext(), folly::RequestContext::setShallowCopyContext(), folly::sync_tests::testAcquireLocked(), and folly::sync_tests::testAcquireLockedWithConst().
std::pair<detail::LockedPtrType<Sync1>, detail::LockedPtrType<Sync2> > folly::acquireLockedPair | ( | Sync1 & | l1, |
Sync2 & | l2 | ||
) |
A version of acquireLocked() that returns a std::pair rather than a std::tuple, which is easier to use in many places.
Definition at line 1644 of file Synchronized.h.
References acquireLocked(), and folly::gen::move.
std::enable_if< boost::function_types::function_arity< decltype(&Lambda::operator())>::value == 2>::type folly::addBenchmark | ( | const char * | file, |
const char * | name, | ||
Lambda && | lambda | ||
) |
Adds a benchmark. Usually not called directly but instead through the macro BENCHMARK defined below. The lambda function involved must take exactly one parameter of type unsigned, and the benchmark uses it with counter semantics (iteration occurs inside the function).
Definition at line 172 of file Benchmark.h.
References folly::detail::addBenchmarkImpl(), folly::test::end(), now(), start, times(), folly::BenchmarkSuspender::timeSpent, and type.
Referenced by addBenchmark(), and detail::addHashBenchmark().
std::enable_if< boost::function_types::function_arity< decltype(&Lambda::operator())>::value == 1>::type folly::addBenchmark | ( | const char * | file, |
const char * | name, | ||
Lambda && | lambda | ||
) |
Adds a benchmark. Usually not called directly but instead through the macro BENCHMARK defined below. The lambda function involved must take zero parameters, and the benchmark calls it repeatedly (iteration occurs outside the function).
Definition at line 201 of file Benchmark.h.
References addBenchmark(), doNotOptimizeAway(), makeUnpredictable(), T, and times().
std::enable_if<isFuture<Ret>::value, Ret>::type folly::aFunction | ( | Params... | ) |
Definition at line 41 of file ThenCompileTest.h.
References makeFuture(), and T.
Referenced by TEST().
std::enable_if<!isFuture<Ret>::value, Ret>::type folly::aFunction | ( | Params... | ) |
Definition at line 47 of file ThenCompileTest.h.
|
inline |
Definition at line 89 of file Memory.h.
References bm::free().
Referenced by folly::CoreRawAllocator< Stripes >::Allocator::deallocate(), folly::AlignedSysAllocator< T, Align >::deallocate(), deallocateBytes(), freeProtectedBuf(), folly::detail::rawOverAlignedImpl(), TEST(), and folly::SimpleAllocator::~SimpleAllocator().
|
inline |
Definition at line 85 of file Memory.h.
Referenced by folly::CoreRawAllocator< Stripes >::Allocator::allocate(), folly::AlignedSysAllocator< T, Align >::allocate(), folly::SimpleAllocator::allocateHard(), createProtectedBuf(), deallocateBytes(), folly::detail::rawOverAlignedImpl(), and TEST().
void folly::alignedForwardMemcpy | ( | void * | dest, |
const void * | src, | ||
size_t | size | ||
) |
A special case of memcpy() that always copies memory forwards. (libc's memcpy() is allowed to copy memory backwards, and will do so when using SSSE3 instructions).
Assumes src and dest are aligned to alignof(unsigned long).
Useful when copying from/to memory mappings after hintLinearScan(); copying backwards renders any prefetching useless (even harmful).
Definition at line 390 of file MemoryMapping.cpp.
References size().
Referenced by mmapFileCopy().
|
inline |
std::unique_ptr<T, allocator_delete<Alloc> > folly::allocate_unique | ( | Alloc const & | alloc, |
Args &&... | args | ||
) |
allocate_unique, like std::allocate_shared but for std::unique_ptr
Definition at line 609 of file Memory.h.
References copy(), FOLLY_UNLIKELY, handler(), folly::gen::move, and T.
|
inline |
std::allocator_traits<Alloc>::pointer folly::allocateOverAligned | ( | Alloc const & | alloc, |
size_t | n | ||
) |
size_t folly::allocationBytesForOverAligned | ( | size_t | n | ) |
Definition at line 223 of file Memory.h.
References testing::Args(), constexpr_min(), make_unique(), T, type, value, and value().
Referenced by TEST().
|
static |
Definition at line 124 of file SanitizeThread.h.
References folly::detail::annotate_benign_race_sized_impl(), and kIsSanitizeThread.
Referenced by folly::SharedMutexImpl< true >::annotateLazyCreate().
|
static |
Definition at line 93 of file SanitizeThread.h.
References folly::detail::annotate_rwlock_acquired_impl(), and kIsSanitizeThread.
Referenced by annotate_rwlock_try_acquired(), folly::detail::annotate_rwlock_try_acquired_impl(), folly::SharedMutexImpl< true >::annotateAcquired(), and folly::observer_detail::ObserverManager::scheduleRefresh().
|
static |
Definition at line 66 of file SanitizeThread.h.
References folly::detail::annotate_rwlock_create_impl(), and kIsSanitizeThread.
Referenced by folly::SharedMutexImpl< true >::annotateLazyCreate().
|
static |
Definition at line 75 of file SanitizeThread.h.
References folly::detail::annotate_rwlock_create_static_impl(), and kIsSanitizeThread.
|
static |
Definition at line 84 of file SanitizeThread.h.
References folly::detail::annotate_rwlock_destroy_impl(), and kIsSanitizeThread.
Referenced by folly::SharedMutexImpl< true >::annotateDestroy().
|
static |
Definition at line 114 of file SanitizeThread.h.
References folly::detail::annotate_rwlock_released_impl(), and kIsSanitizeThread.
Referenced by folly::SharedMutexImpl< true >::annotateReleased(), and folly::observer_detail::ObserverManager::scheduleRefresh().
|
static |
Definition at line 103 of file SanitizeThread.h.
References annotate_rwlock_acquired().
Referenced by folly::SharedMutexImpl< true >::annotateTryAcquired().
decltype(auto) constexpr folly::apply | ( | F && | func, |
Tuple && | tuple | ||
) |
Definition at line 87 of file ApplyTuple.h.
Referenced by folly::gen::GenImpl< StorageType &&, Generator< Value, Source, Rand, StorageType > >::foreach(), folly::detail::SynchronizedLocker< Synchronized, LockFunc, TryLockFunc, Args >::lock(), make_from_tuple(), folly::pushmi::operators::just_fn::impl< VN >::operator()(), folly::ApplyInvoke::operator()(), folly::pushmi::detail::receiver_from_impl< Cardinality, IsFlow >::operator()(), folly::detail::apply_tuple::Uncurry< F >::operator()(), folly::pushmi::detail::set_value_fn::impl< VN >::operator()(), folly::hasher< std::tuple< Ts... > >::operator()(), folly::pushmi::subject< PS, TN... >::subject_shared::submit(), synchronized(), TEST(), folly::pushmi::subject< PS, TN... >::subject_shared::value(), and folly::gen::VirtualGen< Value >::WrapperBase::~WrapperBase().
decltype(auto) folly::apply_visitor | ( | Visitor && | visitor, |
const DiscriminatedPtr< Args... > & | variant | ||
) |
Definition at line 227 of file DiscriminatedPtr.h.
References testing::Args().
Referenced by proxygen::TraceEvent::MetaData::getValueAs(), fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >::processActions(), fizz::server::detail::processEvent(), fizz::client::detail::processEvent(), fizz::ReadRecordLayer::readEvent(), TEST(), folly::test::TEST(), and variant_match().
decltype(auto) folly::apply_visitor | ( | Visitor && | visitor, |
DiscriminatedPtr< Args... > & | variant | ||
) |
Definition at line 234 of file DiscriminatedPtr.h.
References testing::Args().
decltype(auto) folly::apply_visitor | ( | Visitor && | visitor, |
DiscriminatedPtr< Args... > && | variant | ||
) |
Definition at line 241 of file DiscriminatedPtr.h.
A simple helper for getting a constant reference to an object.
Example:
std::vector<int> v{1,2,3}; // The following two lines are equivalent: auto a = const_cast<const std::vector<int>&>(v).begin(); auto b = folly::as_const(v).begin();
Like C++17's std::as_const. See http://wg21.link/p0007
Definition at line 96 of file Utility.h.
References folly::pushmi::detail::t, and T.
Referenced by folly::RequestContext::setContext(), folly::futures::detail::Core< T >::setInterruptHandler(), folly::RequestContext::setShallowCopyContext(), TEST(), and TEST_F().
|
inline |
|
inline |
Definition at line 29 of file Asm.h.
Referenced by asymmetricLightBarrier(), and BENCHMARK().
|
inline |
Definition at line 37 of file Asm.h.
Referenced by folly::UnboundedQueue< T, false, 6 >::advanceHead(), folly::SharedMutexImpl< true >::applyDeferredReaders(), folly::detail::atomic_hash_spin_wait(), folly::FlatCombining< FcSimpleExample< Mutex, Atom >, Mutex, Atom >::awaitDoneTryLock(), folly::MPMCQueue< T, Atom, true >::blockingReadWithTicket(), folly::MPMCQueue< T, Atom, true >::blockingWrite(), folly::DynamicBoundedQueue< T, SingleProducer, SingleConsumer, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom >::canEnqueue(), folly::MicroLockCore::lockSlowPath(), folly::detail::distributed_mutex::spin(), folly::detail::spin_pause_until(), folly::fibers::Baton::spinWaitForEarlyPost(), folly::MPMCQueue< T, Atom, true >::tryObtainPromisedPopTicket(), folly::MPMCQueue< T, Atom, true >::tryObtainPromisedPushTicket(), folly::MPMCQueue< T, Atom, true >::tryObtainReadyPopTicket(), folly::MPMCQueue< T, Atom, true >::tryObtainReadyPushTicket(), folly::detail::TurnSequencer< std::atomic >::tryWaitForTurn(), folly::detail::Sleeper::wait(), and folly::SharedMutexImpl< true >::waitForZeroBits().
FOLLY_ALWAYS_INLINE void folly::assume | ( | bool | cond | ) |
Inform the compiler that the argument can be assumed true. It is undefined behavior if the argument is not actually true, so use with care.
Implemented as a function instead of a macro because __builtin_assume does not evaluate its argument at runtime, so it cannot be used with expressions that have side-effects.
Definition at line 41 of file Assume.h.
References folly::detail::assume_check(), and kIsDebug.
Referenced by assume_unreachable(), BENCHMARK(), folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=(), folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=(), partialLoadUnaligned(), folly::compression::EliasFanoReader< Encoder, Instructions, kUnchecked, SizeType >::readLowerPart(), folly::futures::detail::Core< T >::setCallback(), folly::coro::TimedWaitAwaitable< Awaitable >::SharedState::setException(), folly::futures::detail::Core< T >::setProxy(), folly::futures::detail::Core< T >::setResult(), folly::coro::TimedWaitAwaitable< Awaitable >::SharedState::setValue(), and storeUnaligned().
FOLLY_ALWAYS_INLINE void folly::assume_unreachable | ( | ) |
Definition at line 59 of file Assume.h.
References assume().
Referenced by folly::FcCustomExample< Req, Mutex, Atom >::combinedOp(), compareDynamicWithTolerance(), folly::compression::instructions::dispatch(), folly::dynamic::hash(), folly::json_pointer::parse(), poly_call(), poly_cast(), poly_empty(), poly_move(), poly_type(), fizz::OpenSSLSignature< T >::sign(), folly::ProcessReturnCode::state(), folly::ProcessReturnCode::str(), folly::exception_wrapper::SharedPtr::throw_(), folly::fibers::TimedMutex::timed_lock(), and fizz::OpenSSLSignature< T >::verify().
std::function<Ret(Params...)> folly::aStdFunction | ( | typename std::enable_if<!isFuture< Ret >::value, bool >::type | = false | ) |
Definition at line 52 of file ThenCompileTest.h.
Referenced by TEST().
std::function<Ret(Params...)> folly::aStdFunction | ( | typename std::enable_if< isFuture< Ret >::value, bool >::type | = true | ) |
Definition at line 58 of file ThenCompileTest.h.
References makeFuture(), and T.
void folly::asymmetricHeavyBarrier | ( | AMBFlags | flags | ) |
Definition at line 83 of file AsymmetricMemoryBarrier.cpp.
References checkUnixError(), EXPEDITED, kIsLinux, folly::detail::sysMembarrier(), and folly::detail::sysMembarrierAvailable().
Referenced by asymmetricLightBarrier(), folly::hazptr_domain< DeterministicAtomic >::bulk_reclaim(), folly::detail::ThreadCachedInts< folly::detail::folly::detail::Tag >::readFull(), folly::ThreadPoolExecutor::tryTimeoutThread(), folly::TLRefCount::useGlobal(), and folly::detail::ThreadCachedInts< folly::detail::folly::detail::Tag >::waitForZero().
FOLLY_ALWAYS_INLINE void folly::asymmetricLightBarrier | ( | ) |
Definition at line 30 of file AsymmetricMemoryBarrier.h.
References asm_volatile_memory(), asymmetricHeavyBarrier(), EXPEDITED, and kIsLinux.
Referenced by folly::detail::ThreadCachedInts< folly::detail::folly::detail::Tag >::decrement(), folly::ThreadPoolExecutor::ensureActiveThreads(), folly::detail::ThreadCachedInts< folly::detail::folly::detail::Tag >::increment(), folly::hazptr_domain< DeterministicAtomic >::push_retired(), folly::hazptr_holder< Atom >::try_protect(), folly::TLRefCount::LocalRefCount::update(), and folly::detail::ThreadCachedInts< Tag >::Integer::~Integer().
auto folly::async | ( | F && | fn | ) |
Definition at line 24 of file Async.h.
References getCPUExecutor().
Referenced by cmake_minimum_required(), and TEST().
bool folly::atomic_fetch_reset | ( | Atomic & | atomic, |
std::size_t | bit, | ||
std::memory_order | order = std::memory_order_seq_cst |
||
) |
Resets a bit at the given index in the binary representation of the integer to 0. Returns the previous value of the bit, so true if the bit was changed, false otherwise
This follows the same underlying principle and implementation as fetch_set(). Using the optimized implementation when possible and falling back to std::atomic::fetch_and() when in debug mode or in an architecture where an optimization is not possible
Definition at line 253 of file AtomicUtil-inl.h.
References folly::detail::atomic_fetch_reset_default(), folly::detail::atomic_fetch_reset_x86(), and kIsArchAmd64.
bool folly::atomic_fetch_set | ( | Atomic & | atomic, |
std::size_t | bit, | ||
std::memory_order | order = std::memory_order_seq_cst |
||
) |
Sets a bit at the given index in the binary representation of the integer to 1. Returns the previous value of the bit, so true if the bit was not changed, false otherwise
On some architectures, using this is more efficient than the corresponding std::atomic::fetch_or() with a mask. For example to set the first (least significant) bit of an integer, you could do atomic.fetch_or(0b1)
The efficiency win is only visible in x86 (yet) and comes from the implementation using the x86 bts instruction when possible.
When something other than std::atomic is passed, the implementation assumed incompatibility with this interface and calls Atomic::fetch_or()
Definition at line 237 of file AtomicUtil-inl.h.
References folly::detail::atomic_fetch_set_default(), folly::detail::atomic_fetch_set_x86(), and kIsArchAmd64.
Referenced by folly::detail::distributed_mutex::DistributedMutex< Atomic, TimePublishing >::try_lock().
void folly::atomic_notify_all | ( | const std::atomic< Integer > * | atomic | ) |
Definition at line 144 of file AtomicNotification-inl.h.
References folly::detail::atomic_notification::atomic_notify_all_impl().
void folly::atomic_notify_one | ( | const std::atomic< Integer > * | atomic | ) |
Definition at line 139 of file AtomicNotification-inl.h.
References folly::detail::atomic_notification::atomic_notify_one_impl().
Referenced by folly::detail::distributed_mutex::wakeTimedWaiters().
void folly::atomic_wait | ( | const std::atomic< Integer > * | atomic, |
Integer | expected | ||
) |
The behavior of the atomic_wait() family of functions is semantically identical to futex(). Correspondingly, calling atomic_notify_one(), atomic_notify_all() is identical to futexWake() with 1 and std::numeric_limits<int>::max() respectively
The difference here compared to the futex API above is that it works with all types of atomic widths. When a 32 bit atomic integer is used, the implementation falls back to using futex() if possible, and the compatibility implementation for non-linux systems otherwise. For all other integer widths, the compatibility implementation is used
The templating of this API is changed from the standard in the following ways
Definition at line 125 of file AtomicNotification-inl.h.
References folly::detail::atomic_notification::atomic_wait_impl().
std::cv_status folly::atomic_wait_until | ( | const std::atomic< Integer > * | atomic, |
Integer | expected, | ||
const std::chrono::time_point< Clock, Duration > & | deadline | ||
) |
Definition at line 130 of file AtomicNotification-inl.h.
References folly::detail::atomic_notification::atomic_wait_until_impl().
Referenced by folly::detail::distributed_mutex::timedLock().
void folly::attach | ( | fbvector< T, A > & | v, |
T * | data, | ||
size_t | sz, | ||
size_t | cap | ||
) |
Definition at line 1751 of file FBVector.h.
References folly::fbvector< T, Allocator >::data().
Referenced by test_I_attach3().
back_emplace_iterator<Container, implicit_unpack> folly::back_emplacer | ( | Container & | c | ) |
Convenience function to construct a folly::back_emplace_iterator, analogous to std::back_inserter().
Setting implicit_unpack to false will disable implicit unpacking of single std::pair and std::tuple arguments to the iterator's operator=. That may be desirable in case of constructors that expect a std::pair or std::tuple argument.
Definition at line 492 of file Iterator.h.
References c.
Referenced by TEST().
OutputString folly::backslashify | ( | StringPiece | input, |
bool | hex_style = false |
||
) |
Definition at line 219 of file String.h.
References backslashify(), humanify(), and gmock_output_test::output.
void folly::backslashify | ( | folly::StringPiece | input, |
OutputString & | output, | ||
bool | hex_style = false |
||
) |
Backslashify a string, that is, replace non-printable characters with C-style (but NOT C compliant) "\xHH" encoding. If hex_style is false, then shorthand notations like "\0" will be used instead of "\x00" for the most common backslash cases.
There are two forms, one returning the input string, and one creating output in the specified output string.
This is mainly intended for printing to a terminal, so it is not particularly optimized.
Do not use this in situations where you expect to be able to feed the string to a C or C++ compiler, as there are nuances with how C parses such strings that lead to failures. This is for display purposed only. If you want a string you can embed for use in C or C++, use cEscape instead. This function is for display purposes only.
Definition at line 507 of file String-inl.h.
References c, and folly::Range< Iter >::size().
Referenced by backslashify(), humanify(), TEST(), and uriUnescape().
void folly::basicTest | ( | ) |
Definition at line 25 of file RefCountTest.cpp.
References b, count, EXPECT_EQ, EXPECT_TRUE, i, folly::Baton< MayBlock, Atom >::post(), folly::pushmi::detail::t, and folly::Baton< MayBlock, Atom >::wait().
Referenced by GenericFilterTest< Owned >::getRandomFilters(), and TEST_F().
void folly::benchmark | ( | size_t | n | ) |
Definition at line 32 of file RefCountBenchmark.cpp.
References i, shutdown(), folly::pushmi::detail::t, and x.
folly::BENCHMARK | ( | TLRefCountOneThread | , |
n | |||
) |
Definition at line 55 of file RefCountBenchmark.cpp.
folly::BENCHMARK | ( | TLRefCountFourThreads | , |
n | |||
) |
Definition at line 59 of file RefCountBenchmark.cpp.
folly::BENCHMARK | ( | fbFollyGlobalBenchmarkBaseline | ) |
Definition at line 84 of file Benchmark.cpp.
Referenced by BENCHMARK(), folly::test::TEST(), and TEST().
folly::BENCHMARK | ( | SmallFunctionFunctionPointerInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionStdFunctionInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionStdFunctionWithReferenceWrapperInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionFollyFunctionInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionFollyFunctionRefInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionFunctionPointerCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionStdFunctionCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionStdFunctionReferenceWrapperCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionFollyFunctionCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | SmallFunctionFollyFunctionRefCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionStdFunctionInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionStdFunctionReferenceWrapperInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionFollyFunctionInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionFollyFunctionRefInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionStdFunctionCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionStdFunctionReferenceWrapperCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionFollyFunctionCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK | ( | BigFunctionFollyFunctionRefCreateInvoke | , |
iters | |||
) |
folly::BENCHMARK_DRAW_LINE | ( | ) |
void folly::benchmarkResultsFromDynamic | ( | const dynamic & | d, |
vector< detail::BenchmarkResult > & | results | ||
) |
Definition at line 357 of file Benchmark.cpp.
Referenced by makeUnpredictable(), and resultsFromFile().
void folly::benchmarkResultsToDynamic | ( | const vector< detail::BenchmarkResult > & | data, |
dynamic & | out | ||
) |
Definition at line 348 of file Benchmark.cpp.
References folly::dynamic::push_back().
Referenced by makeUnpredictable(), and printBenchmarkResultsAsVerboseJson().
vector<detail::BenchmarkRegistration>& folly::benchmarks | ( | ) |
Definition at line 75 of file Benchmark.cpp.
Referenced by getGlobalBenchmarkBaselineIndex(), and runBenchmarks().
Definition at line 369 of file Bits.h.
References m, folly::Endian::swap(), T, and type.
Referenced by BENCHMARK(), and TEST().
const CacheLocality& folly::CacheLocality::system< std::atomic > | ( | ) |
Definition at line 61 of file CacheLocality.cpp.
References getSystemLocalityInfo().
CacheLocality const& folly::CacheLocality::system< test::DeterministicAtomic > | ( | ) |
Definition at line 423 of file DeterministicSchedule.cpp.
References folly::CacheLocality::uniform().
FOLLY_ALWAYS_INLINE void folly::call_once | ( | basic_once_flag< Mutex, Atom > & | flag, |
F && | f, | ||
Args &&... | args | ||
) |
Definition at line 56 of file CallOnce.h.
References testing::Args(), folly::basic_once_flag< Mutex, Atom >::basic_once_flag(), folly::basic_once_flag< Mutex, Atom >::call_once, f, folly::pushmi::__adl::noexcept(), and folly::basic_once_flag< Mutex, Atom >::operator=().
Referenced by BENCHMARK(), folly::detail::MemoryIdler::flushLocalMallocCaches(), folly::python::getFiberManager(), folly::observer::SimpleObservable< T >::getObserver(), folly::EventBase::getVirtualEventBase(), folly::fibers::StackCache::protectedPages(), and TEST().
bool folly::canSetCurrentThreadName | ( | ) |
This returns true if the current platform supports setting the name of the current thread.
Definition at line 71 of file ThreadName.cpp.
bool folly::canSetOtherThreadName | ( | ) |
This returns true if the current platform supports setting the name of threads other than the one currently executing.
Definition at line 80 of file ThreadName.cpp.
void folly::cEscape | ( | StringPiece | str, |
String & | out | ||
) |
C-Escape a string, making it suitable for representation as a C string literal. Appends the result to the output string.
Backslashes all occurrences of backslash and double-quote: " -> \" \ -> \
Replaces all non-printable ASCII characters with backslash-octal representation: <ASCII 254> -> \376
Note that we use backslash-octal instead of backslash-hex because the octal representation is guaranteed to consume no more than 3 characters; "\3760" represents two characters, one with value 254, and one with value 48 ('0'), whereas "\xfe0" represents only one character (with value 4064, which leads to implementation-defined behavior).
Definition at line 39 of file String-inl.h.
References folly::Range< Iter >::begin(), c, folly::detail::cEscapeTable, folly::detail::cUnescapeTable, folly::Range< Iter >::end(), folly::detail::hexTable, folly::Range< Iter >::size(), and v.
Referenced by cEscape(), and toStdString().
String folly::cEscape | ( | StringPiece | str | ) |
Similar to cEscape above, but returns the escaped string.
Definition at line 80 of file String.h.
References cEscape(), and cUnescape().
|
inline |
|
inline |
Trivial wrappers around malloc, calloc, realloc that check for allocation failure and throw std::bad_alloc in that case.
Definition at line 227 of file Malloc.h.
Referenced by folly::IOBuf::allocExtBuffer(), folly::fbstring_core< Char >::copyMedium(), folly::fbstring_core< Char >::RefCounted::create(), folly::IOBuf::createCombined(), folly::fbvector< T, Allocator >::Impl::D_allocate(), folly::fbstring_core< Char >::initMedium(), folly::small_vector< Observer< T > *, InlineObservers >::makeSizeInternal(), folly::IOBuf::operator new(), folly::IOBuf::reserveSlow(), folly::fbstring_core< Char >::reserveSmall(), and smartRealloc().
|
inline |
void folly::checkFopenError | ( | FILE * | fp, |
Args &&... | args | ||
) |
Definition at line 118 of file Exception.h.
References testing::Args(), throwSystemError(), and UNLIKELY.
Referenced by folly::File::temporary(), and folly::test::TEST().
void folly::checkFopenErrorExplicit | ( | FILE * | fp, |
int | savedErrno, | ||
Args &&... | args | ||
) |
Definition at line 125 of file Exception.h.
References throwSystemErrorExplicit(), and UNLIKELY.
Referenced by folly::test::TEST().
void folly::checkKernelError | ( | ssize_t | ret, |
Args &&... | args | ||
) |
Definition at line 92 of file Exception.h.
References testing::Args(), throwSystemErrorExplicit(), and UNLIKELY.
Referenced by folly::AsyncIO::initializeContext(), and folly::test::TEST().
void folly::checkPosixError | ( | int | err, |
Args &&... | args | ||
) |
Definition at line 83 of file Exception.h.
References testing::Args(), throwSystemErrorExplicit(), and UNLIKELY.
Referenced by folly::threadlocal_detail::StaticMetaBase::getThreadEntryList(), folly::threadlocal_detail::StaticMeta< Tag, AccessMode >::getThreadEntrySlow(), folly::Subprocess::spawnInternal(), folly::threadlocal_detail::StaticMetaBase::StaticMetaBase(), and folly::test::TEST().
void folly::checkRunMode | ( | ) |
Definition at line 448 of file Benchmark.cpp.
References kIsDebug, and kIsSanitize.
Referenced by runBenchmarks().
bool folly::checkTimeout | ( | const TimePoint & | start, |
const TimePoint & | end, | ||
std::chrono::nanoseconds | expected, | ||
bool | allowSmaller, | ||
std::chrono::nanoseconds | tolerance = std::chrono::milliseconds(5) |
||
) |
bool folly::checkTimeout | ( | const TimePoint & | start, |
const TimePoint & | end, | ||
nanoseconds | expected, | ||
bool | allowSmaller, | ||
nanoseconds | tolerance | ||
) |
Definition at line 241 of file TimeUtil.cpp.
References folly::TimePoint::getTid(), folly::TimePoint::getTimeEnd(), folly::TimePoint::getTimeStart(), and folly::TimePoint::getTimeWaiting().
void folly::checkUnixError | ( | ssize_t | ret, |
Args &&... | args | ||
) |
Definition at line 101 of file Exception.h.
References testing::Args(), throwSystemError(), and UNLIKELY.
Referenced by asymmetricHeavyBarrier(), folly::AsyncIO::AsyncIO(), checkAsyncWriter(), folly::Subprocess::communicate(), folly::File::doLock(), folly::File::doTryLock(), folly::File::dup(), folly::Subprocess::ReadLinesCallback< Callback >::operator()(), folly::AsyncFileWriter::performIO(), folly::Subprocess::pid(), folly::AsyncIO::pollCompleted(), folly::RecordIOWriter::RecordIOWriter(), folly::Subprocess::sendSignal(), folly::Subprocess::setAllNonBlocking(), folly::test::WriteFileAtomic::setDirPerms(), folly::Subprocess::spawn(), folly::Subprocess::spawnInternal(), folly::test::WriteFileAtomic::statFile(), folly::File::temporary(), folly::test::TemporaryFile::TemporaryFile(), folly::test::TEST(), TEST(), TEST(), folly::File::unlock(), and folly::RecordIOWriter::write().
void folly::checkUnixErrorExplicit | ( | ssize_t | ret, |
int | savedErrno, | ||
Args &&... | args | ||
) |
Definition at line 108 of file Exception.h.
References testing::Args(), throwSystemErrorExplicit(), and UNLIKELY.
Referenced by folly::test::TEST().
|
static |
Definition at line 70 of file TDigest.cpp.
References v.
Referenced by folly::TDigest::estimateQuantile().
bool folly::clientProtoFilterPickNone | ( | unsigned char ** | , |
unsigned int * | , | ||
const unsigned char * | , | ||
unsigned | int | ||
) |
Definition at line 171 of file AsyncSSLSocketTest.cpp.
bool folly::clientProtoFilterPickPony | ( | unsigned char ** | client, |
unsigned int * | client_len, | ||
const unsigned char * | , | ||
unsigned | int | ||
) |
Definition at line 158 of file AsyncSSLSocketTest.cpp.
int folly::closeNoInt | ( | int | fd | ) |
Definition at line 56 of file FileUtil.cpp.
References folly::netops::close(), and filterCloseReturn().
Referenced by folly::AsyncServerSocket::bind(), folly::AsyncServerSocket::bindSocket(), folly::ShutdownSocketSet::close(), folly::AsyncServerSocket::createSocket(), folly::AsyncServerSocket::destroy(), folly::AsyncServerSocket::dispatchSocket(), folly::AsyncServerSocket::handlerReady(), wangle::FilePersistenceLayer< K, V >::persist(), readFile(), folly::ShutdownSocketSet::shutdown(), folly::AsyncServerSocket::stopAccepting(), TEST(), testEmptyFile(), testInvalidFile(), testValidFile(), TYPED_TEST(), and writeFile().
int folly::closeNoInt | ( | NetworkSocket | fd | ) |
Definition at line 60 of file FileUtil.cpp.
References folly::netops::close(), and filterCloseReturn().
std::string folly::codePointToUtf8 | ( | char32_t | cp | ) |
auto folly::collect | ( | Collection && | c | ) | -> decltype(collect(c.begin(), c.end())) |
Sugar for the most common case.
Definition at line 344 of file helpers.h.
References c, collect(), and collectAny().
Future< std::vector< typename std::iterator_traits< InputIterator >::value_type::value_type > > folly::collect | ( | InputIterator | first, |
InputIterator | last | ||
) |
Like collectAll, but will short circuit on the first exception. Thus, the type of the returned Future is std::vector<T> instead of std::vector<Try<T>>
Definition at line 1536 of file Future-inl.h.
References folly::gen::first, i, folly::InlineExecutor::instance(), folly::gen::move, folly::futures::detail::FutureBase< T >::result(), folly::pushmi::detail::t, T, and folly::pushmi::operators::transform.
Referenced by collect(), collectAll(), complexBenchmark(), folly::detail::ThreadCachedLists< Tag >::ListHead::forEach(), folly::FutureDAG::go(), folly::futures::test::TEST(), TEST(), TEST_F(), TEST_P(), and folly::TLRefCount::LocalRefCount::~LocalRefCount().
Future< std::tuple< typename remove_cvref_t< Fs >::value_type... > > folly::collect | ( | Fs &&... | fs | ) |
Like collectAll, but will short circuit on the first exception. Thus, the type of the returned Future is std::tuple<T1, T2, ...> instead of std::tuple<Try<T1>, Try<T2>, ...>
Definition at line 1580 of file Future-inl.h.
References f, folly::futures::detail::foreach(), folly::pushmi::operators::get, i, folly::InlineExecutor::instance(), folly::gen::move, folly::pushmi::detail::t, and unwrapTryTuple().
auto folly::collectAll | ( | Collection && | c | ) | -> decltype(collectAll(c.begin(), c.end())) |
Definition at line 319 of file helpers.h.
References c, collect(), collectAll(), and collectAllSemiFuture().
Future< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > folly::collectAll | ( | Fs &&... | fs | ) |
Definition at line 1477 of file Future-inl.h.
References collectAllSemiFuture().
Referenced by collectAll(), collectAllSemiFuture(), complexBenchmark(), and TEST().
Future< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAll | ( | InputIterator | first, |
InputIterator | last | ||
) |
Definition at line 1526 of file Future-inl.h.
References collectAllSemiFuture().
auto folly::collectAllSemiFuture | ( | Collection && | c | ) | -> decltype(collectAllSemiFuture(c.begin(), c.end())) |
Sugar for the most common case.
Definition at line 308 of file helpers.h.
References c, collectAll(), and collectAllSemiFuture().
SemiFuture< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > folly::collectAllSemiFuture | ( | Fs &&... | fs | ) |
This version takes a varying number of Futures instead of an iterator. The return type for (Future<T1>, Future<T2>, ...) input is a Future<std::tuple<Try<T1>, Try<T2>, ...>>. The Futures are moved in, so your copies are invalid.
Definition at line 1441 of file Future-inl.h.
References f, folly::futures::detail::foreach(), folly::pushmi::operators::get, folly::futures::detail::getDeferredExecutor(), i, folly::gen::move, folly::futures::detail::stealDeferredExecutorsVariadic(), and folly::pushmi::detail::t.
Referenced by collectAll(), collectAllSemiFuture(), folly::SemiFuture< T >::delayed(), folly::Future< T >::delayed(), doubleBatchOuterDispatch(), folly::futures::map(), reduce(), TEST(), and folly::Future< T >::willEqual().
SemiFuture< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAllSemiFuture | ( | InputIterator | first, |
InputIterator | last | ||
) |
When all the input Futures complete, the returned Future will complete. Errors do not cause early termination; this Future will always succeed after all its Futures have finished (whether successfully or with an error).
The Futures are moved in, so your copies are invalid. If you need to chain further from these Futures, use the variant with an output iterator.
This function is thread-safe for Futures running on different threads. But if you are doing anything non-trivial after, you will probably want to follow with via(executor)
because it will complete in whichever thread the last Future completes in.
The return type for Future<T> input is a Future<std::vector<Try<T>>>
Definition at line 1487 of file Future-inl.h.
References folly::gen::first, folly::futures::detail::getDeferredExecutor(), i, folly::gen::move, folly::futures::detail::stealDeferredExecutors(), folly::pushmi::detail::t, and T.
auto folly::collectAny | ( | Collection && | c | ) | -> decltype(collectAny(c.begin(), c.end())) |
Sugar for the most common case.
Definition at line 369 of file helpers.h.
References c, collectAny(), and collectAnyWithoutException().
Future< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAny | ( | InputIterator | first, |
InputIterator | last | ||
) |
The result is a pair of the index of the first Future to complete and the Try. If multiple Futures complete at the same time (or are already complete when passed in), the "winner" is chosen non-deterministically.
This function is thread-safe for Futures running on different threads.
Definition at line 1618 of file Future-inl.h.
References folly::gen::first, folly::Promise< T >::getSemiFuture(), i, folly::InlineExecutor::instance(), folly::gen::move, folly::pushmi::detail::t, and T.
Referenced by collect(), collectAny(), complexBenchmark(), and TEST().
auto folly::collectAnyWithoutException | ( | Collection && | c | ) | -> decltype(collectAnyWithoutException(c.begin(), c.end())) |
Sugar for the most common case.
Definition at line 385 of file helpers.h.
References c, collectAnyWithoutException(), and collectN().
SemiFuture< std::pair< size_t, typename std::iterator_traits< InputIterator >::value_type::value_type > > folly::collectAnyWithoutException | ( | InputIterator | first, |
InputIterator | last | ||
) |
Similar to collectAny, collectAnyWithoutException return the first Future to complete without exceptions. If none of the future complete without excpetions, the last exception will be returned as a result.
Definition at line 1644 of file Future-inl.h.
References folly::gen::first, folly::futures::detail::getDeferredExecutor(), i, folly::gen::move, folly::futures::detail::stealDeferredExecutors(), folly::pushmi::detail::t, and T.
Referenced by collectAny(), collectAnyWithoutException(), and TEST().
auto folly::collectN | ( | Collection && | c, |
size_t | n | ||
) | -> decltype(collectN(c.begin(), c.end(), n)) |
Sugar for the most common case.
Definition at line 404 of file helpers.h.
References c, collectN(), and window().
SemiFuture< std::vector< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > > folly::collectN | ( | InputIterator | first, |
InputIterator | last, | ||
size_t | n | ||
) |
when n Futures have completed, the Future completes with a vector of the index and Try of those n Futures (the indices refer to the original order, but the result vector will be in an arbitrary order)
Not thread safe.
Definition at line 1692 of file Future-inl.h.
References c, folly::gen::first, i, min, min_, folly::gen::move, folly::futures::detail::FutureBase< T >::result(), s, folly::futures::detail::FutureBase< T >::setCallback_(), folly::pushmi::detail::t, T, v, and folly::futures::detail::FutureBase< T >::value().
Referenced by collectAnyWithoutException(), collectN(), and TEST().
Definition at line 1715 of file FBVector.h.
void folly::compareBenchmarkResults | ( | const std::string & | base, |
const std::string & | test | ||
) |
Definition at line 34 of file BenchmarkCompare.cpp.
References printResultComparison(), and resultsFromFile().
Referenced by main().
bool folly::compareDynamicWithTolerance | ( | const dynamic & | obj1, |
const dynamic & | obj2, | ||
double | tolerance | ||
) |
Like compareJsonWithTolerance, but operates directly on the dynamics.
Definition at line 42 of file JsonTestUtil.cpp.
References folly::dynamic::asBool(), folly::dynamic::asDouble(), folly::dynamic::asInt(), folly::dynamic::asString(), assume_unreachable(), folly::dynamic::begin(), folly::dynamic::end(), folly::dynamic::get_ptr(), folly::dynamic::isInt(), folly::dynamic::isNumber(), folly::dynamic::items(), folly::dynamic::size(), STRING, and folly::dynamic::type().
Referenced by compareJsonWithTolerance().
bool folly::compareJson | ( | StringPiece | json1, |
StringPiece | json2 | ||
) |
Compares two JSON strings and returns whether they represent the same document (thus ignoring things like object ordering or multiple representations of the same number).
This is implemented by deserializing both strings into dynamic, so it is not efficient and it is meant to only be used in tests.
It will throw an exception if any of the inputs is invalid.
Definition at line 28 of file JsonTestUtil.cpp.
References parseJson().
Referenced by TEST().
bool folly::compareJsonWithTolerance | ( | StringPiece | json1, |
StringPiece | json2, | ||
double | tolerance | ||
) |
Like compareJson, but allows for the given tolerance when comparing numbers.
Note that in the dynamic flavor of JSON 64-bit integers are a supported type. If the values to be compared are both integers, tolerance is not applied (it may not be possible to represent them as double without loss of precision).
When comparing objects exact key match is required, including if keys are doubles (again a dynamic extension).
Definition at line 96 of file JsonTestUtil.cpp.
References compareDynamicWithTolerance(), and parseJson().
Referenced by TEST().
|
noexcept |
NOTE: See detailed note about constCastFunction
at the top of the file. This is potentially dangerous and requires the equivalent of a const_cast
.
Definition at line 845 of file Function.h.
References testing::Args(), and folly::gen::move.
Referenced by constCastFunction(), and TEST().
|
noexcept |
Definition at line 852 of file Function.h.
References testing::Args(), constCastFunction(), and folly::gen::move.
constexpr auto folly::constexpr_abs | ( | T | t | ) | -> decltype(detail::constexpr_abs_helper<T>::go(t)) |
Definition at line 135 of file ConstexprMath.h.
References folly::pushmi::detail::t.
Referenced by TEST_F().
Definition at line 217 of file ConstexprMath.h.
References constexpr_clamp(), constexpr_max(), constexpr_min(), M, max, min, T, and value.
Referenced by constexpr_sub_overflow_clamped(), NoOverflowAdd(), and TEST_F().
Definition at line 168 of file ConstexprMath.h.
References folly::chrono::round(), and T.
Referenced by TEST_F().
constexpr T const& folly::constexpr_clamp | ( | T const & | v, |
T const & | lo, | ||
T const & | hi, | ||
Less | less | ||
) |
Definition at line 89 of file ConstexprMath.h.
References v.
Referenced by constexpr_add_overflow_clamped(), constexpr_clamp(), constexpr_clamp_cast(), constexpr_sub_overflow_clamped(), folly::LogCategory::setLevelLocked(), and TEST_F().
constexpr T const& folly::constexpr_clamp | ( | T const & | v, |
T const & | lo, | ||
T const & | hi | ||
) |
Definition at line 93 of file ConstexprMath.h.
References constexpr_clamp().
constexpr std::enable_if<std::is_integral<Src>::value, Dst>::type folly::constexpr_clamp_cast | ( | Src | src | ) |
Definition at line 303 of file ConstexprMath.h.
References constexpr_clamp(), constexpr_min(), int64_t, max, min, and value.
Referenced by constexpr_clamp_cast().
constexpr std::enable_if<std::is_floating_point<Src>::value, Dst>::type folly::constexpr_clamp_cast | ( | Src | src | ) |
Definition at line 363 of file ConstexprMath.h.
References constexpr_clamp_cast(), folly::detail::constexpr_clamp_cast_helper(), int64_t, folly::detail::kClampCastLowerBoundDoubleToInt64F, folly::detail::kClampCastLowerBoundFloatToInt32F, folly::detail::kClampCastUpperBoundDoubleToInt64F, folly::detail::kClampCastUpperBoundDoubleToUInt64F, folly::detail::kClampCastUpperBoundFloatToInt32F, folly::detail::kClampCastUpperBoundFloatToUInt32F, max, min, uint64_t, and value.
constexpr std::size_t folly::constexpr_find_first_set | ( | T | t | ) |
constexpr_find_first_set
Return the 1-based index of the least significant bit which is set. For x > 0, the exponent in the largest power of two which does not divide x.
Definition at line 208 of file ConstexprMath.h.
References folly::detail::constexpr_find_first_set_(), size(), folly::pushmi::detail::t, and T.
Referenced by TEST_F().
constexpr std::size_t folly::constexpr_find_last_set | ( | T const | t | ) |
constexpr_find_last_set
Return the 1-based index of the most significant bit which is set. For x > 0, constexpr_find_last_set(x) == 1 + floor(log2(x)).
Definition at line 188 of file ConstexprMath.h.
References constexpr_log2(), and T.
Referenced by TEST_F().
Definition at line 158 of file ConstexprMath.h.
References folly::detail::constexpr_log2_(), and T.
Referenced by constexpr_find_last_set(), constexpr_log2_ceil(), folly::UnboundedQueue< T, SingleProducer, SingleConsumer, MayBlock, LgSegmentSize, LgAlign, Atom >::Segment::push_links(), and TEST_F().
Definition at line 163 of file ConstexprMath.h.
References constexpr_log2(), and folly::detail::constexpr_log2_ceil_().
Referenced by TEST_F().
Definition at line 68 of file ConstexprMath.h.
Referenced by constexpr_add_overflow_clamped(), constexpr_max(), folly::FormatValue< double >::formatHelper(), folly::fibers::FiberManager::FibersPoolResizer::operator()(), folly::BasicFixedString< Char, N >::swap(), and TEST_F().
Definition at line 79 of file ConstexprMath.h.
Referenced by allocationBytesForOverAligned(), folly::BasicFixedString< Char, N >::BasicFixedString(), constexpr_add_overflow_clamped(), constexpr_clamp_cast(), constexpr_min(), folly::BasicFixedString< Char, N >::find_last_not_of(), folly::BasicFixedString< Char, N >::find_last_of(), folly::detail::rawOverAlignedImpl(), folly::BasicFixedString< Char, N >::rfind(), and TEST_F().
Definition at line 175 of file ConstexprMath.h.
References folly::detail::constexpr_square_(), and T.
Referenced by folly::detail::format_table_conv_make_item< Base, Size, Upper >::make_item::operator()(), and TEST_F().
constexpr int folly::constexpr_strcmp | ( | const Char * | s1, |
const Char * | s2 | ||
) |
Definition at line 75 of file Constexpr.h.
References folly::detail::constexpr_strcmp_internal().
Referenced by TEST().
constexpr int folly::constexpr_strcmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 80 of file Constexpr.h.
References folly::detail::constexpr_strcmp_internal().
constexpr size_t folly::constexpr_strlen | ( | const Char * | s | ) |
Definition at line 57 of file Constexpr.h.
References folly::detail::constexpr_strlen_internal().
Referenced by folly::BasicFixedString< Char, N >::append(), folly::BasicFixedString< Char, N >::compare(), folly::BasicFixedString< Char, N >::find(), folly::BasicFixedString< Char, N >::find_first_not_of(), folly::BasicFixedString< Char, N >::find_first_of(), folly::BasicFixedString< Char, N >::find_last_not_of(), folly::BasicFixedString< Char, N >::find_last_of(), folly::BasicFixedString< Char, N >::replace(), folly::BasicFixedString< Char, N >::rfind(), and TEST().
constexpr size_t folly::constexpr_strlen | ( | const char * | s | ) |
Definition at line 62 of file Constexpr.h.
References folly::detail::constexpr_strlen_internal().
Definition at line 240 of file ConstexprMath.h.
References b, constexpr_add_overflow_clamped(), constexpr_clamp(), M, max, min, T, type, and value.
Referenced by NoOverflowSub(), and TEST_F().
wangle::SSLSessionCacheData folly::convertTo | ( | const dynamic & | d | ) |
Definition at line 34 of file SSLSessionCacheData.cpp.
References wangle::SSLSessionCacheData::addedTime, folly::dynamic::asString(), data, folly::dynamic::getDefault(), wangle::SSLSessionCacheData::serviceIdentity, and wangle::SSLSessionCacheData::sessionData.
copy
Usable when you have a function with two overloads:
class MyData; void something(MyData&&); void something(const MyData&);
Where the purpose is to make copies and moves explicit without having to spell out the full type names - in this case, for copies, to invoke copy constructors.
When the caller wants to pass a copy of an lvalue, the caller may:
void foo() { MyData data; something(folly::copy(data)); // explicit copy something(std::move(data)); // explicit move something(data); // const& - neither move nor copy }
Note: If passed an rvalue, invokes the move-ctor, not the copy-ctor. This can be used to to force a move, where just using std::move would not:
std::copy(std::move(data)); // force-move, not just a cast to &&
Note: The following text appears in the standard:
In several places in this Clause the operation //DECAY_COPY(x)// is used. All such uses mean call the function
decay_copy(x)
and use the result, wheredecay_copy
is defined as follows:template <class t>=""> decay_t<T> decay_copy(T&& v) { return std::forward<T>(v); }
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf 30.2.6
decay_copy
[thread.decaycopy].
We mimic it, with a noexcept
specifier for good measure.
Definition at line 72 of file Utility.h.
References as_const(), and value().
Referenced by testing::ACTION_TEMPLATE(), allocate_unique(), folly::fbvector< HTTPHeaderCode >::assign(), BENCHMARK(), BENCHMARK_RELATIVE(), folly::detail::bulk_insert(), clause11_21_4_4(), clause11_21_4_6_1(), folly::BasicFixedString< Char, N >::copy(), folly::fbvector< HTTPHeaderCode >::erase(), folly::basic_fbstring< char >::erase(), folly::Function< std::vector< ResultT >(std::vector< InputT > &&)>::Function(), folly::Future< T >::get(), folly::ssl::OpenSSLUtils::getTLSClientRandom(), folly::ssl::OpenSSLUtils::getTLSMasterKey(), testing::internal::NativeArray< Element >::InitCopy(), folly::basic_fbstring< E, T, A, Storage >::insertImpl(), testing::internal::linked_ptr< const testing::MatcherInterface< const internal::string & > >::linked_ptr(), main(), merge(), folly::TDigest::merge(), deadlock.DiGraph::node_link_data(), folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator++(), folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator--(), folly::DelayedDestructionBase::IntrusivePtr< AliasType >::operator=(), testing::internal::linked_ptr< const testing::MatcherInterface< const internal::string & > >::operator=(), testing::internal::InvokeMethodAction< Class, MethodPtr >::Perform(), folly::TypedIOBuf< T >::push(), folly::Range< unsigned char * >::replaceAt(), folly::basic_fbstring< E, T, A, Storage >::replaceImpl(), folly::fbvector< HTTPHeaderCode >::resize(), runContendedReaders(), folly::EventBase::runInEventBaseThreadAndWait(), TEST(), TEST_F(), testCmp(), testRandom(), and folly::Function< std::vector< ResultT >(std::vector< InputT > &&)>::~Function().
constexpr auto folly::crange | ( | Collection const & | v | ) | -> Range<decltype(v.data())> |
Compute the CRC-32 checksum of a buffer, using a hardware-accelerated implementation if available or a portable software implementation as a default.
Definition at line 136 of file Checksum.cpp.
References folly::detail::crc32_hw(), folly::detail::crc32_hw_supported(), folly::detail::crc32_sw(), and uint32_t.
Referenced by crc32_combine(), crc32_type(), and TEST().
|
static |
Definition at line 132 of file Crc32CombineDetail.cpp.
References findFirstSet().
Referenced by folly::detail::crc32_combine_hw(), folly::detail::crc32_combine_sw(), folly::detail::crc32c_combine_hw(), and folly::detail::crc32c_combine_sw().
Given two checksums, combine them in to one checksum.
Example: len1 len2 Given a buffer [ checksum 1 | checksum 2 ] such that the first buffer's crc is checksum1 and has length len1, and the remainder of the buffer's crc is checksum2 and len 2, a total checksum over the whole buffer can be made by:
crc32_combine(checksum1, checksum 2, len2); // len1 not needed.
Note that this is equivalent to:
crc32(buffer2, len2, crc32(buffer1, len1));
However, this allows calculating the checksums in parallel or calculating checksum 2 before checksum 1.
Additionally, this is also equivalent, but much slower: crc2 = crc32(buffer2, len2, 0); crc1 = crc32(buffer1, len1, 0); combined = crc2 ^ crc32(buffer_of_all_zeros, len2, crc1);
crc32[c]_combine is roughly ~10x faster than either of the other above two examples.
Definition at line 149 of file Checksum.cpp.
References crc32(), folly::detail::crc32_combine_hw(), folly::detail::crc32_combine_sw(), folly::detail::crc32_hw_supported(), and uint8_t.
Referenced by benchmarkCombineHardwareCrc32(), and TEST().
Compute the CRC-32 checksum of a buffer, using a hardware-accelerated implementation if available or a portable software implementation as a default.
Definition at line 145 of file Checksum.cpp.
References crc32().
Compute the CRC-32C checksum of a buffer, using a hardware-accelerated implementation if available or a portable software implementation as a default.
Definition at line 128 of file Checksum.cpp.
References folly::detail::crc32c_hw(), folly::detail::crc32c_hw_supported(), and folly::detail::crc32c_sw().
Referenced by benchmarkCombineSoftwareLinear(), crc32c_combine(), and TEST().
Definition at line 164 of file Checksum.cpp.
References folly::detail::crc32_hw_supported(), crc32c(), folly::detail::crc32c_combine_hw(), folly::detail::crc32c_combine_sw(), and uint8_t.
Referenced by benchmarkCombineHardwareCrc32c(), and TEST().
void folly::cUnescape | ( | StringPiece | str, |
String & | out, | ||
bool | strict = true |
||
) |
C-Unescape a string; the opposite of cEscape above. Appends the result to the output string.
Recognizes the standard C escape sequences:
\' " \? \
[0-7]+ [0-9a-fA-F]+
In strict mode (default), throws std::invalid_argument if it encounters an unrecognized escape sequence. In non-strict mode, it leaves the escape sequence unchanged.
Definition at line 86 of file String-inl.h.
References folly::Range< Iter >::begin(), c, folly::detail::cUnescapeTable, folly::Range< Iter >::end(), h, folly::detail::hexTable, i, folly::Range< Iter >::size(), folly::detail::uriEscapeTable, and val.
Referenced by cEscape(), and cUnescape().
String folly::cUnescape | ( | StringPiece | str, |
bool | strict = true |
||
) |
Similar to cUnescape above, but returns the escaped string.
Definition at line 107 of file String.h.
References cUnescape().
constexpr auto folly::data | ( | C & | c | ) | -> decltype(c.data()) |
Definition at line 71 of file Access.h.
References c.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::addOrGetData(), folly::pushmi::any_constrained_single_sender< E, TP, VN... >::any_constrained_single_sender(), folly::pushmi::any_receiver< E, folly::pushmi::any_executor_ref< E > >::any_receiver(), folly::AsyncFileWriter::AsyncFileWriter(), folly::detail::atomic_notification::atomic_notify_all_impl(), folly::detail::atomic_notification::atomic_notify_one_impl(), BENCHMARK(), folly::RequestContext::clearContextData(), AcceptRoutingHandlerTest::clientConnectAndWrite(), fizz::detail::computeTranscriptHash(), folly::NotificationQueue< MessageT >::Consumer::consumeMessages(), folly::NotificationQueue< MessageT >::SimpleConsumer::consumeUntilDrained(), folly::detail::crc32_sw(), folly::detail::crc32c_sw(), folly::RequestContext::create(), fizz::test::HandshakeTypesTest::decodeHex(), fizz::test::ZlibCertificateCompressorTest::decodeHex(), folly::io::StreamCodec::doCompress(), folly::io::StreamCodec::doUncompress(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Accessor::erase(), folly::hash::SpookyHashV1::Final(), folly::hash::SpookyHashV2::Final(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::findInsertionPointGetMaxLayer(), folly::AsyncFileWriter::flush(), folly::experimental::EnvironmentState::fromCurrentEnvironment(), folly::RequestEventBase::get(), folly::atomic_shared_ptr< T, Atom, CountedDetail >::get_newptr(), folly::SendMsgParamsCallbackBase::getAncillaryData(), folly::SendMsgDataCallback::getAncillaryData(), fizz::test::PlaintextRecordTest::getBuf(), fizz::extensions::test::TokenBindingConstructorTest::getBuf(), fizz::test::EncryptedRecordTest::getBuf(), fizz::test::RecordTest::getBuf(), fizz::extensions::test::ValidatorTest::getBuf(), folly::AsyncFileWriter::Data::getCurrentQueue(), fizz::detail::getFinishedData(), folly::AsyncFileWriter::getMaxBufferSize(), folly::observer::Observer< T >::getSnapshot(), folly::LockedPtrBase< SynchronizedType, SynchronizedType::MutexType, LockPolicy >::getSynchronized(), getVersionedSpdyFrame(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::greater(), folly::AsyncUDPSocket::handleErrMessages(), folly::AsyncSocket::handleErrMessages(), folly::atomic_shared_ptr< T, Atom, CountedDetail >::init(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Accessor::insert(), folly::AsyncFileWriter::ioThread(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::less(), makeUnpredictable(), folly::compression::maybeTestPrevious(), folly::compression::maybeTestPreviousValue(), ReadStats::messageReceived(), folly::AsyncUDPServerSocket::onDataAvailable(), folly::RequestContext::onSet(), folly::RequestContext::onUnset(), folly::pushmi::detail::via_fn::on_error_impl< Out >::operator()(), folly::padded::Node< T, NS, typename detail::NodeValid< T, NS >::type >::operator==(), folly::ParkingLot< Data >::park(), folly::ParkingLot< Data >::park_for(), folly::ParkingLot< Data >::park_until(), folly::SSLContext::passwordCollector(), preallocate_postallocate_bench(), folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::putMessageImpl(), folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::putMessagesImpl(), folly::LockedPtrBase< SynchronizedType, SynchronizedType::MutexType, LockPolicy >::reacquireLock(), folly::LockedPtrBase< SynchronizedType, std::mutex, LockPolicy >::reacquireLock(), folly::test::WriteFileAtomic::readData(), folly::LockedPtrBase< SynchronizedType, std::mutex, LockPolicy >::releaseLock(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::remove(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Accessor::remove(), folly::SendMsgDataCallback::resetData(), folly::AsyncFileWriter::restartThread(), folly::LogMessage::sanitizeMessage(), folly::RequestContext::setContext(), RequestContextTest::setData(), folly::AsyncFileWriter::setMaxBufferSize(), folly::detail::distributed_mutex::spin(), inline_executor_flow_single< CancellationFactory >::submit(), inline_executor_flow_many::submit(), TEST(), TEST(), TEST_F(), TEST_P(), folly::compression::testAll(), folly::compression::testEmpty(), folly::compression::testSkip(), folly::compression::testSkipTo(), folly::test::testVarintFail(), folly::detail::distributed_mutex::timedLock(), folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::tryConsume(), folly::detail::RingBufferSlot< T, Atom >::tryRead(), folly::io::Codec::type(), TYPED_TEST(), folly::io::StreamCodec::uncompressedLength(), folly::detail::RingBufferSlot< T, Atom >::waitAndTryRead(), folly::detail::RingBufferSlot< T, Atom >::write(), proxygen::http2::writeData(), writeFile(), folly::AsyncFileWriter::writeMessage(), ReadStats::writerFinished(), folly::AsyncFileWriter::~AsyncFileWriter(), folly::ExpectWriteErrorCallback::~ExpectWriteErrorCallback(), and folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::~NotificationQueue().
constexpr auto folly::data | ( | C const & | c | ) | -> decltype(c.data()) |
|
inline |
Definition at line 47 of file Memory.h.
References aligned_free(), aligned_malloc(), bm::free(), ptr, and size().
Referenced by TEST().
Decode a value from a given buffer, advances data past the returned value. Throws on error.
Definition at line 135 of file Varint.h.
References TooManyBytes, and tryDecodeVarint().
Referenced by folly::test::TEST(), and folly::test::testVarint().
hazptr_domain<Atom>& folly::default_hazptr_domain | ( | ) |
default_hazptr_domain
Definition at line 363 of file HazptrDomain.h.
References Atom, and folly::hazptr_default_domain_helper< Atom >::get().
FOLLY_ALWAYS_INLINE hazptr_domain<Atom>& folly::default_hazptr_domain | ( | ) |
default_hazptr_domain
Definition at line 363 of file HazptrDomain.h.
References Atom, and folly::hazptr_default_domain_helper< Atom >::get().
detail::DefaultValueWrapper<Container, Value> folly::defaulted | ( | const Container & | c, |
const Value & | v | ||
) |
folly::DEFINE_int64 | ( | threadtimeout_ms | , |
60000 | , | ||
"Idle time before ThreadPoolExecutor threads are joined" | |||
) |
Referenced by getSyncVecThreadPoolExecutors().
|
inline |
Definition at line 35 of file Demangle.h.
References demangle(), and name.
|
inline |
Definition at line 58 of file Demangle.h.
References demangle(), upload::dest, size(), and strlcpy().
fbstring folly::demangle | ( | const char * | name | ) |
Return the demangled (prettyfied) version of a C++ type.
This function tries to produce a human-readable type, but the type name will be returned unchanged in case of error or if demangling isn't supported on your system.
Use for debugging – do not rely on demangle() returning anything useful.
This function may allocate memory (and therefore throw std::bad_alloc).
Definition at line 111 of file Demangle.cpp.
References name.
Referenced by folly::exception_wrapper::class_name(), demangle(), folly::symbolizer::SymbolizedFrame::demangledName(), folly::detail::errorValue(), exceptionStr(), folly::detail::fallbackFormatOneArg(), folly::exception_tracer::getCurrentExceptions(), folly::ThreadPoolExecutor::getName(), folly::detail::TypeDescriptor::name(), folly::f14::operator<<(), folly::symbolizer::SymbolizePrinter::print(), folly::exception_tracer::printExceptionInfo(), folly::symbolizer::SymbolizePrinter::printTerse(), wangle::ContextImplBase< H, InboundHandlerContext< H::rout > >::setNextIn(), wangle::ContextImplBase< H, InboundHandlerContext< H::rout > >::setNextOut(), folly::detail::singletonThrowNullCreator(), and TEST().
size_t folly::demangle | ( | const char * | name, |
char * | buf, | ||
size_t | bufSize | ||
) |
Return the demangled (prettyfied) version of a C++ type in a user-provided buffer.
The semantics are the same as for snprintf or strlcpy: bufSize is the size of the buffer, the string is always null-terminated, and the return value is the number of characters (not including the null terminator) that would have been written if the buffer was big enough. (So a return value >= bufSize indicates that the output was truncated)
This function does not allocate memory and is async-signal-safe.
Note that the underlying function for the fbstring-returning demangle is somewhat standard (abi::__cxa_demangle, which uses malloc), the underlying function for this version is less so (cplus_demangle_v3_callback from libiberty), so it is possible for the fbstring version to work, while this version returns the original, mangled name.
Definition at line 115 of file Demangle.cpp.
References strlcpy().
Returns the number of digits in the base 10 representation of an uint64_t. Useful for preallocating buffers and such. It's also used internally, see below. Measurements suggest that defining a separate overload for 32-bit integers is not worthwhile.
Definition at line 295 of file Conv.h.
References LIKELY, uint32_t, uint64_t, and UNLIKELY.
Referenced by testing::internal::CmpHelperFloatingPointEQ(), testing::internal::FloatingEqMatcher< FloatType >::Impl< T >::DescribeNegationTo(), testing::internal::FloatingEqMatcher< FloatType >::Impl< T >::DescribeTo(), folly::detail::digits_to(), estimateSpaceNeeded(), testing::internal::FloatingPointLE(), testing::Message::Message(), testing::internal::ShouldRunTestCase(), TEST(), u64ToAsciiTable(), and uint64ToBufferUnsafe().
|
inline |
Returns num/denom, rounded toward positive infinity. Put another way, returns the smallest integral value that is greater than or equal to the exact (not rounded) fraction num/denom.
This function undergoes the same integer promotion rules as a built-in operator, except that we don't allow bool -> int promotion. This function is undefined if denom == 0. It is also undefined if the result type T is a signed type, num is std::numeric_limits<T>::min(), and denom is equal to -1 after conversion to the result type.
Definition at line 152 of file Math.h.
References value.
|
inline |
Returns num/denom, rounded toward negative infinity. Put another way, returns the largest integral value that is less than or equal to the exact (not rounded) fraction num/denom.
The matching remainder (num - divFloor(num, denom) * denom) can be negative only if denom is negative, unlike in truncating division. Note that for unsigned types this is the same as the normal integer division operator. divFloor is equivalent to python's integral division operator //.
This function undergoes the same integer promotion rules as a built-in operator, except that we don't allow bool -> int promotion. This function is undefined if denom == 0. It is also undefined if the result type T is a signed type, num is std::numeric_limits<T>::min(), and denom is equal to -1 after conversion to the result type.
Definition at line 132 of file Math.h.
References value.
|
inline |
Returns num/denom, rounded away from zero. If num and denom are non-zero and have different signs (so the unrounded fraction num/denom is negative), returns divFloor, otherwise returns divCeil. If T is an unsigned type then this is always equal to divCeil.
This function undergoes the same integer promotion rules as a built-in operator, except that we don't allow bool -> int promotion. This function is undefined if denom == 0. It is also undefined if the result type T is a signed type, num is std::numeric_limits<T>::min(), and denom is equal to -1 after conversion to the result type.
Definition at line 195 of file Math.h.
References value.
|
inline |
Returns num/denom, rounded toward zero. If num and denom are non-zero and have different signs (so the unrounded fraction num/denom is negative), returns divCeil, otherwise returns divFloor. If T is an unsigned type then this is always equal to divFloor.
Note that this is the same as the normal integer division operator, at least since C99 (before then the rounding for negative results was implementation defined). This function is here for completeness and as a place to hang this comment.
This function undergoes the same integer promotion rules as a built-in operator, except that we don't allow bool -> int promotion. This function is undefined if denom == 0. It is also undefined if the result type T is a signed type, num is std::numeric_limits<T>::min(), and denom is equal to -1 after conversion to the result type.
auto folly::doNotOptimizeAway | ( | const T & | datum | ) | -> typename std::enable_if< !detail::DoNotOptimizeAwayNeedsIndirect<T>::value>::type |
Definition at line 258 of file Benchmark.h.
Referenced by addBenchmark(), assignmentFill(), assignmentOp(), atomicIncrBaseline(), BENCHMARK(), BENCHMARK_RELATIVE(), benchmarkCombineHardwareCrc32(), benchmarkCombineHardwareCrc32c(), benchmarkCombineSoftwareLinear(), benchmarkGet(), benchmarkHardwareCRC32(), benchmarkHardwareCRC32C(), benchmarkSet(), benchmarkSoftwareCRC32(), benchmarkSoftwareCRC32C(), detail::bmHasher(), folly::compression::bmJump(), folly::compression::bmJumpTo(), folly::compression::bmNext(), folly::compression::bmSkip(), folly::compression::bmSkipTo(), burn(), clibAtoiMeasure(), contentionAtWidth(), copyCtor(), countHits(), ctorFromArray(), ctorFromChar(), ctorFromTwoPointers(), defaultCtor(), folly::test::doWork(), doWork(), encryptGCM(), equality(), fillCtor(), findFirstOfRandom(), findFirstOfRange(), findSuccessful(), findUnsuccessful(), follyAtoiMeasure(), fun(), getline(), getNormalSingleton(), handwrittenAtoiMeasure(), i64ToStringFollyMeasureNeg(), i64ToStringFollyMeasurePos(), lexicalCastMeasure(), Lines_Gen(), main(), meyersSingleton(), normalSingleton(), StringIdenticalToBM< String >::operator()(), StringVariadicToBM< String >::operator()(), preallocate_postallocate_bench(), recurse(), replace(), resize(), Run(), runArithmeticBench(), runContendedReaders(), runMixed(), runPushBenchmark(), sizeCtor(), StringUnsplit_Gen(), test_operator_on_search(), u2aAppendClassicBM(), u2aAppendFollyBM(), u64ToAsciiClassicBM(), u64ToAsciiFollyBM(), u64ToAsciiTableBM(), u64ToStringClibMeasure(), and u64ToStringFollyMeasure().
int folly::dup2NoInt | ( | int | oldfd, |
int | newfd | ||
) |
Definition at line 72 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by folly::ShutdownSocketSet::doShutdown().
int folly::dupNoInt | ( | int | fd | ) |
emplace_iterator<Container, implicit_unpack> folly::emplacer | ( | Container & | c, |
typename Container::iterator | i | ||
) |
Convenience function to construct a folly::emplace_iterator, analogous to std::inserter().
Setting implicit_unpack to false will disable implicit unpacking of single std::pair and std::tuple arguments to the iterator's operator=. That may be desirable in case of constructors that expect a std::pair or std::tuple argument.
Definition at line 445 of file Iterator.h.
References c, and folly::gen::move.
Referenced by TEST().
constexpr auto folly::empty | ( | C const & | c | ) | -> decltype(c.empty()) |
Definition at line 55 of file Access.h.
References c.
Referenced by folly::futures::detail::WaitExecutor::add(), folly::Uri::authority(), folly::padded::Adaptor< IntNodeVec >::back(), folly::small_vector< Observer< T > *, InlineObservers >::back(), folly::basic_fbstring< char >::back(), checkTracepointArguments(), clause11_21_4_4(), folly::IOBuf::destroy(), folly::pushmi::operators::empty(), folly::Range< unsigned char * >::endsWith(), folly::basic_fbstring< E, T, A, Storage >::find_last_not_of(), folly::basic_fbstring< E, T, A, Storage >::find_last_of(), folly::padded::Adaptor< IntNodeVec >::front(), folly::small_vector< Observer< T > *, InlineObservers >::front(), folly::ssl::OpenSSLUtils::getCipherName(), proxygen::getCodecProtocolString(), folly::FutureDAG::hasCycle(), folly::symbolizer::Dwarf::LineNumberVM::init(), isSane(), folly::basic_fbstring< char >::isSane(), main(), testing::gtest_printers_test::AllowsGenericStreamingAndImplicitConversionTemplate< T >::operator bool(), folly::StringKeyedMap< Value, Compare, Alloc >::operator=(), folly::StringKeyedSetBase< Compare, Alloc >::operator=(), folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=(), folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=(), folly::basic_fbstring< E, T, A, Storage >::operator=(), testing::internal::ParseGoogleTestFlag(), CurlService::CurlClient::parseHeaders(), testing::gmock_generated_actions_test::SubstractAction::Perform(), folly::padded::Adaptor< IntNodeVec >::pop_back(), folly::basic_fbstring< char >::pop_back(), runBenchmarks(), folly::io::test::StreamingCompressionTest::runCompressStreamTest(), folly::Range< unsigned char * >::startsWith(), folly::pushmi::detail::trampoline< E >::submit(), CommonTest< T >::TearDown(), TEST(), fizz::test::TEST(), testing::internal::TEST(), TEST(), testing::gtest_printers_test::TEST(), testing::gmock_generated_actions_test::TEST(), TEST_F(), test_moveConstructionWithAllocatorSupplied3(), folly::io::test::TEST_P(), testing::internal::To::To(), folly::observer::SimpleObservable< T >::Wrapper< T >::unsubscribe(), and folly::AtomicIntrusiveLinkedList< folly::fibers::Fiber,&folly::fibers::Fiber::nextRemoteReady_ >::~AtomicIntrusiveLinkedList().
|
noexcept |
|
noexcept |
Encode a value in the given buffer, returning the number of bytes used for encoding. buf must have enough space to represent the value (at least kMaxVarintLength64 bytes to encode arbitrary 64-bit values)
Definition at line 109 of file Varint.h.
References uint8_t.
Referenced by folly::io::StreamCodec::doUncompress(), folly::test::TEST(), and folly::test::testVarint().
|
inline |
Determine the number of bytes needed to represent "val". 32-bit values need at most 5 bytes. 64-bit values need at most 10 bytes.
Definition at line 119 of file Varint.h.
References kIsArchAmd64, and s.
Referenced by folly::test::testVarint().
ZigZag encoding that maps signed integers with a small absolute value to unsigned integers with a small (positive) values. Without this, encoding negative values using Varint would use up 9 or 10 bytes.
if x >= 0, encodeZigZag(x) == 2*x if x < 0, encodeZigZag(x) == -2*x + 1
Definition at line 96 of file Varint.h.
Referenced by folly::test::TEST().
detail::RangeEnumerator<Range> folly::enumerate | ( | Range && | r | ) |
Definition at line 167 of file Enumerate.h.
Referenced by cpp.ast.AstBuilder::_GenerateOne(), BENCHMARK(), folly::CoreCachedWeakPtr< T, kNumSlots >::CoreCachedWeakPtr(), cpp.ast.TypeConverter::DeclarationToParts(), folly::CoreCachedSharedPtr< T, kNumSlots >::reset(), folly::AtomicCoreCachedSharedPtr< T, kNumSlots >::reset(), TEST(), and validateTestCertBundle().
fbstring folly::errnoStr | ( | int | err | ) |
Return a fbstring containing the description of the given errno value. Takes care not to overwrite the actual system errno, so calling errnoStr(errno) is valid.
Definition at line 463 of file String.cpp.
References folly::basic_fbstring< E, T, A, Storage >::assign(), c, folly::gen::guard(), makeGuard(), uint32_t, uint64_t, and uint8_t.
Referenced by folly::AsyncIO::doWait(), folly::JemallocNodumpAllocator::extend_and_setup_arena(), getfds(), getLinuxVersion(), folly::AsyncSocketException::getMessage(), folly::detail::handleMallctlError(), fizz::tool::TerminalInputHandler::handlerReady(), folly::PriorityThreadFactory::newThread(), operator<<(), folly::JemallocNodumpAllocator::reallocate(), folly::EventHandler::registerImpl(), folly::NestedCommandLineApp::run(), folly::EventBase::scheduleTimeout(), folly::AsyncSocket::setCongestionFlavor(), folly::AsyncServerSocket::setKeepAliveEnabled(), folly::AsyncSocket::setNoDelay(), folly::AsyncSocket::setQuickAck(), folly::AsyncSocket::setRecvBufSize(), folly::AsyncSocket::setSendBufSize(), folly::AsyncSocket::setTCPProfile(), folly::AsyncServerSocket::setupSocket(), folly::Subprocess::spawnInternal(), folly::IPAddressV6::str(), TEST(), toSubprocessSpawnErrorMessage(), folly::ImmediateFileWriter::writeMessage(), and folly::AsyncIO::~AsyncIO().
constexpr std::enable_if<std::is_same<T, char>::value, size_t>::type folly::estimateSpaceNeeded | ( | T | ) |
Definition at line 412 of file Conv.h.
Referenced by estimateSpaceNeeded(), my::estimateSpaceNeeded(), and toAppend().
constexpr size_t folly::estimateSpaceNeeded | ( | const | char(&)[N] | ) |
std::enable_if<std::is_convertible<Src, const char*>::value, size_t>:: type folly::estimateSpaceNeeded | ( | Src | value | ) |
std::enable_if<IsSomeString<Src>::value, size_t>::type folly::estimateSpaceNeeded | ( | Src const & | value | ) |
std::enable_if< std::is_convertible<Src, folly::StringPiece>::value && !IsSomeString<Src>::value && !std::is_convertible<Src, const char*>::value, size_t>::type folly::estimateSpaceNeeded | ( | Src | value | ) |
|
inline |
std::enable_if< std::is_pointer<Src>::value && IsSomeString<std::remove_pointer<Src> >::value, size_t>::type folly::estimateSpaceNeeded | ( | Src | value | ) |
size_t::type folly::estimateSpaceNeeded | ( | Src | value | ) |
Definition at line 585 of file Conv.h.
References buffer(), shell_builder::builder, digits10(), estimateSpaceNeeded(), int64_t, max, mode, T, toAppend(), type, uint64_t, uint64ToBufferUnsafe(), value, and value().
|
static |
Given a bunch of benchmark samples, estimate the actual run time.
Definition at line 117 of file Benchmark.cpp.
Referenced by runBenchmarkGetNSPerIteration().
|
inline |
Definition at line 41 of file EventUtil.h.
Referenced by folly::EventBase::attachTimeoutManager(), folly::EventUtil::isEventRegistered(), folly::EventHandler::isPending(), folly::AsyncTimeout::libeventCallback(), folly::EventHandler::registerImpl(), TimeoutTest::setClock(), and TimeoutTest::SetUp().
|
inline |
Definition at line 41 of file EventUtil.h.
|
inline |
Debug string for an exception: include type and what(), if defined.
Definition at line 33 of file ExceptionString.h.
References demangle().
Referenced by wangle::SSLContextManager::addSSLContextConfig(), folly::test::detail::checkThrowErrno(), folly::test::detail::checkThrowRegex(), ProxyService::ProxyHandler::connectError(), folly::observer_detail::ObserverManager::CurrentQueue::CurrentQueue(), folly::python::AsyncioExecutor::drive(), proxygen::HTTPMessage::getDecodedQueryParam(), folly::ssl::ssl_options_detail::logDfatal(), main(), wangle::ObservingHandler< T, R, P >::onError(), folly::AsyncFileWriter::onIoError(), proxygen::HTTPServerAcceptor::onNewConnection(), StaticService::StaticHandler::onRequest(), proxygen::GzipHeaderCodec::parseNameValues(), folly::exception_tracer::printExceptionInfo(), folly::LogCategory::processMessage(), FileServerHandler::read(), ProxyService::ProxyHandler::readErr(), TelnetHandler::readException(), wangle::BroadcastHandler< T, R >::readException(), EchoHandler::readException(), ProxyBackendHandler::readException(), wangle::ObservingHandler< T, R, P >::readException(), FileServerHandler::readException(), ProxyFrontendHandler::readException(), proxygen::compress::CompressionSimulator::readInputFromFileAndSchedule(), folly::observer_detail::Core::refresh(), folly::SerialExecutor::run(), folly::FunctionScheduler::runOneFunction(), folly::ssl::SSLCommonOptions::setClientOptions(), folly::LoggerDB::startConfigUpdate(), swap(), TEST(), ProxyFrontendHandler::transportActive(), and ProxyService::ProxyHandler::writeErr().
auto folly::exceptionStr | ( | const E & | e | ) | -> typename std:: enable_if<!std::is_base_of<std::exception, E>::value, fbstring>::type |
fbstring folly::exceptionStr | ( | exception_wrapper const & | ew | ) |
Definition at line 101 of file ExceptionWrapper.cpp.
References folly::exception_wrapper::what().
Definition at line 120 of file Utility.h.
References folly::gen::move, and T.
Referenced by folly::futures::detail::DeferredExecutor::add(), folly::pushmi::any_constrained_single_sender< E, TP, VN... >::any_constrained_single_sender(), folly::pushmi::any_flow_many_sender< PE, PV, E, VN >::any_flow_many_sender(), folly::pushmi::any_flow_receiver< PE, PV, E, VN >::any_flow_receiver(), folly::pushmi::any_flow_single_sender< PE, E, VN >::any_flow_single_sender(), folly::pushmi::any_many_sender< E, VN >::any_many_sender(), folly::pushmi::any_receiver< E, folly::pushmi::any_executor_ref< E > >::any_receiver(), folly::pushmi::any_single_sender< E, VN >::any_single_sender(), folly::test::TemporaryFile::assign(), folly::futures::detail::FutureBase< T >::assign(), folly::LockedPtrBase< SynchronizedType, SynchronizedType::MutexType, LockPolicy >::assignImpl(), folly::LockedPtrBase< SynchronizedType, std::mutex, LockPolicy >::assignImpl(), folly::coro::detail::InlineTask< T >::Awaiter::await_resume(), folly::coro::TaskWithExecutor< T >::Awaiter::await_resume(), folly::coro::detail::TaskPromiseBase::await_transform(), folly::futures::detail::chainExecutor(), folly::coro::detail::ViaCoroutine::destroy(), folly::Try< T >::destroy(), folly::futures::detail::DeferredExecutor::detach(), folly::detail::distributed_mutex::DistributedMutex< Atomic, TimePublishing >::DistributedMutexStateProxy< Atomic, TimePublishing >::DistributedMutexStateProxy(), folly::futures::detail::Core< T >::doCallback(), folly::detail::distributed_mutex::doFutexWait(), folly::futures::detail::WaitExecutor::drive(), folly::futures::detail::WaitExecutor::driveUntil(), ExpensiveCopy::ExpensiveCopy(), forward_like(), folly::observer_detail::ObserverManager::initCore(), folly::ThreadPoolExecutor::joinKeepAliveOnce(), folly::LockedPtrBase< SynchronizedType, SynchronizedType::MutexType, LockPolicy >::LockedPtrBase(), folly::LockedPtrBase< SynchronizedType, std::mutex, LockPolicy >::LockedPtrBase(), folly::LeakySingleton< T, Tag >::make_mock(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromUpgradeToRead(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromUpgradeToWrite(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromWriteToRead(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromWriteToUpgrade(), fizz::sm::negotiateParameters(), fizz::sm::negotiatePsk(), folly::coro::detail::InlineTask< T >::operator co_await(), folly::coro::TaskWithExecutor< T >::operator co_await(), folly::Executor::KeepAlive< folly::VirtualEventBase >::operator=(), folly::Promise< T >::operator=(), folly::ConcurrentHashMap< KeyType, ValueType, HashFn, KeyEqual, Allocator, ShardBits, Atom, Mutex >::ConstIterator::operator=(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::Iterator::operator=(), folly::Executor::KeepAlive< folly::VirtualEventBase >::reset(), folly::coro::Task< T >::scheduleOn(), folly::detail::ScopeGuardImpl< FunctionType, InvokeNoexcept >::ScopeGuardImpl(), folly::futures::detail::DeferredExecutor::setExecutor(), TEST(), TEST_F(), folly::detail::distributed_mutex::DistributedMutex< Atomic, TimePublishing >::unlock(), and unorderedReduce().
int folly::fdatasyncNoInt | ( | int | fd | ) |
Definition at line 76 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by wangle::FilePersistenceLayer< K, V >::persist().
decltype(auto) FOLLY_CPP14_CONSTEXPR folly::fetch | ( | Sequence && | sequence, |
Index && | index | ||
) |
Utility method to help access elements of a sequence with one uniform interface.
This can be useful for example when you are looping through a sequence and want to modify another sequence based on the information in the current sequence:
auto range_one = std::make_tuple(1, 2, 3); auto range_two = std::make_tuple(4, 5, 6); folly::for_each(range_one, [&range_two](auto ele, auto index) { folly::fetch(range_two, index) = ele; });
For ranges, this works by first trying to use the iterator class if the iterator has been marked to be a random access iterator. This should be inspectable via the std::iterator_traits traits class. If the iterator class is not present or is not a random access iterator then the implementation falls back to trying to use the indexing operator (operator[]) to fetch the required element.
Definition at line 322 of file Foreach-inl.h.
References folly::for_each_detail::fetch_impl().
Referenced by BENCHMARK(), folly::detail::lock(), and TEST().
|
static |
BitIterator< BaseIter > folly::findFirstSet | ( | BitIterator< BaseIter > | begin, |
BitIterator< BaseIter > | end | ||
) |
Find first bit set in a range of bit iterators. 4.5x faster than the obvious std::find(begin, end, true);
Definition at line 170 of file BitIterator.h.
References folly::BitIterator< BaseIter >::advanceInBlock(), folly::BitIterator< BaseIter >::advanceToNextBlock(), folly::test::begin(), folly::BitIterator< BaseIter >::bitOffset(), folly::test::end(), and folly::BitIterator< BaseIter >::findFirstSet.
Referenced by crc32_append_zeroes(), folly::json::firstEscapableInWord(), folly::HHWheelTimer::scheduleNextTimeout(), and TEST_F().
|
inline |
findFirstSet
Return the 1-based index of the least significant bit which is set. For x > 0, the exponent in the largest power of two which does not divide x.
Definition at line 82 of file Bits.h.
References folly::detail::bits_to_signed(), T, and value.
|
inline |
findLastSet
Return the 1-based index of the most significant bit which is set. For x > 0, findLastSet(x) == 1 + floor(log2(x)).
Definition at line 105 of file Bits.h.
References folly::detail::bits_to_unsigned(), size(), T, and value.
Referenced by benchmarkSet(), folly::compression::EliasFanoEncoderV2< Value, SkipValue, kSkipQuantum, kForwardQuantum >::defaultNumLowerBits(), folly::compression::EliasFanoReader< Encoder, Instructions, kUnchecked, SizeType >::EliasFanoReader(), folly::json::firstEscapableInWord(), nextPowTwo(), prevPowTwo(), and TEST_F().
|
inline |
Compute the 128-bit Rabin fingerprint of a string. Return the 64 most significant bits in *msb, and the 64 least significant bits in *lsb.
Definition at line 217 of file Fingerprint.h.
References uint64_t, and folly::Fingerprint< BITS >::write().
Referenced by TEST().
|
inline |
Return the 64-bit Rabin fingerprint of a string.
Definition at line 194 of file Fingerprint.h.
References uint64_t, and folly::Fingerprint< BITS >::write().
Referenced by TEST().
|
inline |
Compute the 96-bit Rabin fingerprint of a string. Return the 64 most significant bits in *msb, and the 32 least significant bits in *lsb.
Definition at line 205 of file Fingerprint.h.
References uint32_t, uint64_t, and folly::Fingerprint< BITS >::write().
Referenced by TEST().
int folly::flockNoInt | ( | int | fd, |
int | operation | ||
) |
Definition at line 94 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by folly::File::doLock(), folly::File::doTryLock(), and folly::File::unlock().
folly::FOLLY_ASSUME_RELOCATABLE | ( | T2 | ) |
folly::FOLLY_ASSUME_RELOCATABLE | ( | basic_fbstring< T, R, A, S > | ) |
|
inline |
Definition at line 50 of file Event.h.
References getLibeventFd().
Referenced by folly::AsyncTimeout::AsyncTimeout(), folly::EventHandler::changeHandlerFD(), folly::EventHandler::EventHandler(), and folly::EventHandler::initHandler().
FOLLY_CPP14_CONSTEXPR Func folly::for_each | ( | Range && | range, |
Func | func | ||
) |
for_each
folly::for_each is a generalized iteration algorithm. Example:
auto one = std::make_tuple(1, 2, 3); auto two = std::vector<int>{1, 2, 3}; auto func = [](auto element, auto index) { cout << index << " : " << element << endl; }; folly::for_each(one, func); folly::for_each(two, func);
The for_each function allows iteration through sequences, these can either be runtime sequences (i.e. entities for which std::begin and std::end work) or compile time sequences (as deemed by the presence of std::tuple_length<> and member get<> or ADL get<> functions).
If a sequence type is both a runtime sequence (aka range) and a compile-time sequence (aka tuple), then it is treated as a range in preference to a tuple. An example of such a type is std::array.
The function is made to provide a convenient library based alternative to the proposal p0589r0, which aims to generalize the range based for loop even further to work with compile time sequences.
A drawback of using range based for loops is that sometimes you do not have access to the index within the range. This provides easy access to that, even with compile time sequences.
And breaking out is easy:
auto range_one = std::vector<int>{1, 2, 3}; auto range_two = std::make_tuple(1, 2, 3); auto func = [](auto ele, auto index) { cout << "Element at index " << index << " : " << ele; if (index == 1) { return folly::loop_break; } return folly::loop_continue; }; folly_for_each(range_one, func); folly_for_each(range_two, func);
A simple use case would be when using futures, if the user was doing calls to n servers then they would accept the callback with the futures like this:
auto vec = std::vector<std::future<int>>{request_one(), ...}; when_all(vec.begin(), vec.end()).then([](auto futures) { folly::for_each(futures, [](auto& fut) { ... }); });
Now when this code switches to use tuples instead of the runtime std::vector, then the loop does not need to change, the code will still work just fine:
when_all(future_one, future_two, future_three).then([](auto futures) { folly::for_each(futures, [](auto& fut) { ... }); });
FOLLY_CPP14_CONSTEXPR Func folly::for_each | ( | Sequence && | sequence, |
Func | func | ||
) |
Definition at line 314 of file Foreach-inl.h.
References folly::for_each_detail::for_each_impl().
Referenced by BENCHMARK(), folly::detail::lock(), lock(), and TEST().
Formatter< false, Args... > folly::format | ( | StringPiece | fmt, |
Args &&... | args | ||
) |
Create a formatter object.
std::string formatted = format("{} {}", 23, 42).str(); LOG(INFO) << format("{} {}", 23, 42); writeTo(stdout, format("{} {}", 23, 42));
Definition at line 271 of file Format.h.
References testing::Args().
Referenced by fbcode_builder.FBCodeBuilder::__repr__(), docker_builder.DockerFBCodeBuilder::_change_user(), fbcode_builder.FBCodeBuilder::_make_vars(), fbcode_builder::_read_project_github_hashes(), fbcode_builder.FBCodeBuilder::add_option(), fbcode_builder.FBCodeBuilder::autoconf_install(), BENCHMARK(), BENCHMARK_RELATIVE(), fbcode_builder.FBCodeBuilder::cmake_configure(), fbcode_builder.FBCodeBuilder::cmake_install(), fbcode_builder.FBCodeBuilder::configure(), shell_builder.ShellFBCodeBuilder::copy_local_repo(), docker_builder.DockerFBCodeBuilder::copy_local_repo(), docker_builder.DockerFBCodeBuilder::debian_ccache_setup_steps(), fbcode_builder.FBCodeBuilder::diagnostics(), TestExtendingFormatter< containerMode, Args >::doFormatArg(), specs.fbzmq::fbcode_builder_spec(), gdb::fiber_activate(), folly::File::File(), folly::FormatValue< ToStringFailure >::format(), folly::FormatValue< KeyValue >::format(), folly::FormatValue< NoncopyableInt >::format(), folly::FormatValue< bool >::format(), folly::FormatValue< float >::format(), folly::FormatValue< dynamic >::format(), folly::FormatValue< detail::DefaultValueWrapper< dynamic, V > >::format(), format20Numbers(), folly::CustomLogFormatter::formatMessage(), folly::GlogStyleFormatter::formatMessage(), folly::ssl::getOpenSSLLongVersion(), fbcode_builder.FBCodeBuilder::github_project_workdir(), fbcode_builder.FBCodeBuilder::install_debian_deps(), fatal_test.FatalTests::is_debug_build(), folly::AutoTimer< Logger, Clock >::logFormat(), loggingFormatPrintf(), fbcode_builder.FBCodeBuilder::make_and_install(), make_docker_context::make_docker_context(), folly::MemoryMapping::mlock(), folly::SSLContext::needsPeerVerification(), fbcode_builder.FBCodeBuilder::option(), fbcode_builder.FBCodeBuilder::parallel_make(), parse_args::parse_args_to_fbcode_builder_opts(), testing::internal::PrintAsStringLiteralTo(), testing::internal::PrintCharAndCodeTo(), shell_quoting::raw_shell(), fbcode_builder.FBCodeBuilder::render(), rtrimWhitespace(), shell_builder.ShellFBCodeBuilder::run(), docker_builder.DockerFBCodeBuilder::run(), utils::run_command(), docker_builder.DockerFBCodeBuilder::setup(), shell_builder.ShellFBCodeBuilder::setup(), shell_quoting::shell_comment(), shell_builder.ShellFBCodeBuilder::step(), docker_builder.DockerFBCodeBuilder::step(), TEST(), uriUnescape(), shell_builder.ShellFBCodeBuilder::workdir(), docker_builder.DockerFBCodeBuilder::workdir(), and folly::MemoryMapping::~MemoryMapping().
std::enable_if<IsSomeString<Str>::value>::type folly::format | ( | Str * | out, |
StringPiece | fmt, | ||
Args &&... | args | ||
) |
Append formatted output to a string.
std::string foo; format(&foo, "{} {}", 42, 23);
Shortcut for toAppend(format(...), &foo);
Definition at line 369 of file Format.h.
Referenced by folly::Formatter< containerMode, Args >::doFormatArg(), formatChecked(), and sformat().
Formatter<false, Args...> folly::formatChecked | ( | StringPiece | fmt, |
Args &&... | args | ||
) |
Definition at line 465 of file Format.h.
References testing::Args(), and format().
std::enable_if<IsSomeString<Str>::value>::type folly::formatChecked | ( | Str * | out, |
StringPiece | fmt, | ||
Args &&... | args | ||
) |
Definition at line 484 of file Format.h.
Referenced by sformatChecked().
|
noexcept |
Definition at line 107 of file Utility.h.
References exchange().
|
noexcept |
Get a tuple of references from the passed tuple, forwarding will be applied on the individual types of the tuple based on the value category of the passed tuple
For example
forward_tuple(std::make_tuple(1, 2))
Returns a std::tuple<int&&, int&&>,
auto tuple = std::make_tuple(1, 2); forward_tuple(tuple)
Returns a std::tuple<int&, int&>
Definition at line 110 of file ApplyTuple.h.
References folly::detail::apply_tuple::adl::forward_tuple().
Referenced by TEST().
front_emplace_iterator<Container, implicit_unpack> folly::front_emplacer | ( | Container & | c | ) |
Convenience function to construct a folly::front_emplace_iterator, analogous to std::front_inserter().
Setting implicit_unpack to false will disable implicit unpacking of single std::pair and std::tuple arguments to the iterator's operator=. That may be desirable in case of constructors that expect a std::pair or std::tuple argument.
Definition at line 477 of file Iterator.h.
References c.
Referenced by TEST().
int folly::fsyncNoInt | ( | int | fd | ) |
Definition at line 64 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by folly::detail::assertionFailure(), and folly::symbolizer::SafeStackTracePrinter::flush().
int folly::ftruncateNoInt | ( | int | fd, |
off_t | len | ||
) |
Definition at line 86 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by TEST().
Map::mapped_type folly::get_default | ( | const Map & | map, |
const Key & | key | ||
) |
Given a map and a key, return the value corresponding to the key in the map, or a given default value if the key doesn't exist in the map.
Definition at line 31 of file MapUtil.h.
References testing::Key(), type, value, and testing::Value().
Referenced by get_default(), folly::detail::EventBaseLocalBase::getVoid(), TEST(), and TEST_F().
Map::mapped_type folly::get_default | ( | const Map & | map, |
const Key & | key, | ||
Value && | dflt | ||
) |
Definition at line 41 of file MapUtil.h.
References M.
auto folly::get_default | ( | const Map & | map, |
const Key1 & | key1, | ||
const Key2 & | key2, | ||
const KeysDefault &... | keysDefault | ||
) | -> typename detail::NestedMapType<Map, 1 + sizeof...(KeysDefault)>::type |
Given a map and a path of keys, return the value corresponding to the nested value, or a given default value if the path doesn't exist in the map. The default value is the last parameter, and is copied when returned.
Definition at line 269 of file MapUtil.h.
References folly::detail::extract_default(), get_default(), get_ptr(), ptr, type, and value().
|
noexcept |
Getter function for unpacking a single emplace argument.
Calling get_emplace_arg on an emplace_args rvalue reference results in perfect forwarding of the original input types. A special case are std::reference_wrapper and folly::rvalue_reference_wrapper objects within folly::emplace_args. These are also unwrapped so that the bare reference is returned.
std::get is not a customization point in the standard library, so the cleanest solution was to define our own getter function.
Definition at line 126 of file Iterator.h.
References testing::Args(), and folly::detail::unwrap_emplace_arg().
|
noexcept |
Definition at line 132 of file Iterator.h.
References testing::Args(), and folly::detail::unwrap_emplace_arg().
|
noexcept |
Definition at line 136 of file Iterator.h.
References folly::detail::unwrap_emplace_arg().
|
noexcept |
|
noexcept |
Definition at line 144 of file Iterator.h.
|
noexcept |
Definition at line 148 of file Iterator.h.
folly::Optional<typename Map::mapped_type> folly::get_optional | ( | const Map & | map, |
const Key & | key | ||
) |
Given a map and a key, return a Optional<V> if the key exists and None if the key does not exist in the map.
Definition at line 102 of file MapUtil.h.
References none.
Referenced by get_optional(), printResultComparison(), and TEST().
auto folly::get_optional | ( | const Map & | map, |
const Key1 & | key1, | ||
const Key2 & | key2, | ||
const Keys &... | keys | ||
) | -> folly::Optional< typename detail::NestedMapType<Map, 2 + sizeof...(Keys)>::type> |
Given a map of maps and a path of keys, return a Optional<V> if the nested key exists and None if the nested keys does not exist in the map.
Definition at line 224 of file MapUtil.h.
References get_optional(), and none.
const Map::mapped_type& folly::get_or_throw | ( | const Map & | map, |
const Key & | key, | ||
const std::string & | exceptionStrPrefix = std::string() |
||
) |
Given a map and a key, return the value corresponding to the key in the map, or throw an exception of the specified type.
Definition at line 71 of file MapUtil.h.
Referenced by TEST(), and TEST_F().
Map::mapped_type& folly::get_or_throw | ( | Map & | map, |
const Key & | key, | ||
const std::string & | exceptionStrPrefix = std::string() |
||
) |
Definition at line 86 of file MapUtil.h.
Definition at line 435 of file Optional.h.
References folly::Optional< Value >::get_pointer().
Definition at line 440 of file Optional.h.
References folly::Optional< Value >::get_pointer().
|
noexcept |
Definition at line 1374 of file Expected.h.
Referenced by folly::Optional< NamedGroup >::get_pointer(), folly::Expected< int, E >::get_pointer(), and TEST().
|
noexcept |
Definition at line 1379 of file Expected.h.
const Map::mapped_type* folly::get_ptr | ( | const Map & | map, |
const Key & | key | ||
) |
Given a map and a key, return a pointer to the value corresponding to the key in the map, or nullptr if the key doesn't exist in the map.
Definition at line 169 of file MapUtil.h.
Referenced by folly::test::ManualSchedule::beforeSharedAccess(), folly::StandardLogHandlerFactory::createHandler(), get_default(), get_ptr(), get_ref_default(), folly::DynamicParser::optional(), TEST(), folly::TestLogHandlerFactory::updateHandler(), and folly::LogCategory::updateHandlers().
Map::mapped_type* folly::get_ptr | ( | Map & | map, |
const Key & | key | ||
) |
auto folly::get_ptr | ( | const Map & | map, |
const Key1 & | key1, | ||
const Key2 & | key2, | ||
const Keys &... | keys | ||
) | -> typename detail::NestedMapType<Map, 2 + sizeof...(Keys)>::type const* |
Given a map of maps and a path of keys, return a pointer to the nested value, or nullptr if the key doesn't exist in the map.
Definition at line 241 of file MapUtil.h.
References get_ptr().
auto folly::get_ptr | ( | Map & | map, |
const Key1 & | key1, | ||
const Key2 & | key2, | ||
const Keys &... | keys | ||
) | -> typename detail::NestedMapType<Map, 2 + sizeof...(Keys)>::type* |
Definition at line 252 of file MapUtil.h.
References get_ptr(), and type.
const Map::mapped_type& folly::get_ref_default | ( | const Map & | map, |
const Key & | key, | ||
const typename Map::mapped_type & | dflt | ||
) |
Given a map and a key, return a reference to the value corresponding to the key in the map, or the given default reference if the key doesn't exist in the map.
Definition at line 119 of file MapUtil.h.
Referenced by get_ref_default(), folly::RequestContext::getContextData(), and TEST().
|
delete |
Passing a temporary default value returns a dangling reference when it is returned. Lifetime extension is broken by the indirection. The caller must ensure that the default value outlives the reference returned by get_ref_default().
|
delete |
const Map::mapped_type& folly::get_ref_default | ( | const Map & | map, |
const Key & | key, | ||
Func && | dflt | ||
) |
Given a map and a key, return a reference to the value corresponding to the key in the map, or the given default reference if the key doesn't exist in the map.
Definition at line 159 of file MapUtil.h.
auto folly::get_ref_default | ( | const Map & | map, |
const Key1 & | key1, | ||
const Key2 & | key2, | ||
KeysDefault &&... | keysDefault | ||
) | -> typename detail::NestedMapType<Map, 1 + sizeof...(KeysDefault)>::type const& |
Given a map and a path of keys, return a reference to the value corresponding to the nested value, or the given default reference if the path doesn't exist in the map. The default value is the last parameter, and must be a lvalue reference.
Definition at line 295 of file MapUtil.h.
References folly::detail::extract_default(), get_ptr(), get_ref_default(), and ptr.
constexpr Pointer& folly::get_underlying | ( | propagate_const< Pointer > & | obj | ) |
Definition at line 32 of file PropagateConst.h.
References folly::propagate_const< Pointer >::pointer_.
Referenced by operator!=(), std::hash< folly::propagate_const< Pointer > >::operator()(), std::equal_to< folly::propagate_const< Pointer > >::operator()(), std::not_equal_to< folly::propagate_const< Pointer > >::operator()(), std::less< folly::propagate_const< Pointer > >::operator()(), std::greater< folly::propagate_const< Pointer > >::operator()(), std::less_equal< folly::propagate_const< Pointer > >::operator()(), std::greater_equal< folly::propagate_const< Pointer > >::operator()(), operator<(), operator<=(), operator==(), operator>(), operator>=(), and TEST_F().
constexpr Pointer const& folly::get_underlying | ( | propagate_const< Pointer > const & | obj | ) |
Definition at line 37 of file PropagateConst.h.
References folly::propagate_const< Pointer >::pointer_.
const char * folly::getBaseLoggingConfig | ( | ) |
folly::getBaseLoggingConfig() allows individual executables to easily customize their default logging configuration.
You can define this function in your executable and folly::initLogging() will call it to get the base logging configuration. The settings returned by getBaseLoggingConfig() will then be modified by updating them with the configuration string parameter passed to initLogging().
This allows the user-specified configuration passed to initLogging() to update the base configuration. The user-specified configuration can apply additional settings, and it may also override settings for categories and handlers defined in the base configuration.
See folly/logging/example/main.cpp for an example that defines getBaseLoggingConfig().
If this function returns a non-null pointer, it should point to a null-terminated string with static storage duration.
Definition at line 29 of file InitWeak.cpp.
Referenced by initLogging().
CxxAllocatorAdaptor<T, typename CoreRawAllocator<Stripes>::Allocator> folly::getCoreAllocator | ( | size_t | stripe | ) |
std::shared_ptr< folly::Executor > folly::getCPUExecutor | ( | ) |
Retrieve the global Executor. If there is none, a default InlineExecutor will be constructed and returned. This is named CPUExecutor to distinguish it from IOExecutor below and to hint that it's intended for CPU-bound tasks.
Can return nullptr on shutdown.
Definition at line 90 of file GlobalExecutor.cpp.
References singleton.
Referenced by async(), StaticService::StaticHandler::onEgressResumed(), StaticService::StaticHandler::onRequest(), and TEST().
void folly::getctx | ( | std::shared_ptr< folly::SSLContext > | clientCtx, |
std::shared_ptr< folly::SSLContext > | serverCtx | ||
) |
Definition at line 131 of file AsyncSSLSocketTest.cpp.
References kTestCert, and kTestKey.
Referenced by folly::TestSSLAsyncCacheServer::getSessionCallback(), folly::SSLSessionTest::SetUp(), sslsocketpair(), and TEST().
|
inline |
Get a process-specific identifier for the current thread.
The return value will uniquely identify the thread within the current process.
Note that the return value does not necessarily correspond to an operating system thread ID. The return value is also only unique within the current process: getCurrentThreadID() may return the same value for two concurrently running threads in separate processes.
The thread ID may be reused once the thread it corresponds to has been joined.
Definition at line 42 of file ThreadId.h.
References uint64_t.
Referenced by folly::ssl::detail::callbackThreadID(), folly::HashingThreadId::get(), folly::detail::MemoryIdler::getVariationTimeout(), ShardedAtomicInt::inc(), and TEST().
Optional< std::string > folly::getCurrentThreadName | ( | ) |
Equivalent to getThreadName(std::this_thread::get_id());
Definition at line 105 of file ThreadName.cpp.
References getThreadName().
Referenced by TEST(), and TEST_F().
folly::EventBase * folly::getEventBase | ( | ) |
Retrieve an event base from the global IOExecutor
NOTE: This is not shutdown-safe, the returned pointer may be invalid during shutdown.
Definition at line 116 of file GlobalExecutor.cpp.
References getIOExecutor().
Referenced by fizz::server::test::AsyncFizzServerTest::accept(), wangle::ServerBootstrap< DefaultPipeline >::bind(), AcceptRoutingHandlerTest::clientConnectAndCleanClose(), AcceptRoutingHandlerTest::clientConnectAndWrite(), HTTPUpstreamTest< SPDY3CodecPair >::commonSetUp(), HTTP2UpstreamSessionWithVirtualNodesTest::commonSetUp(), folly::EventBase::isInTimeoutManagerThread(), AcceptRoutingHandlerTest::justClientConnect(), MockCodecDownstreamTest::MockCodecDownstreamTest(), proxygen::newMockTransport(), StaticService::StaticHandler::onEgressResumed(), TestAcceptor::onNewConnection(), StaticService::StaticHandler::onRequest(), ProxyService::ProxyHandler::onRequest(), AcceptRoutingHandlerTest::sendClientException(), proxygen::HTTPSessionBase::setSessionStats(), TEST(), TEST(), wangle::TEST(), proxygen::HandlerCallbacks::threadStarted(), and proxygen::HandlerCallbacks::threadStopped().
void folly::getfds | ( | int | fds[2] | ) |
Definition at line 114 of file AsyncSSLSocketTest.cpp.
References errnoStr(), FAIL, and folly::netops::socketpair().
Referenced by folly::TestSSLAsyncCacheServer::getSessionCallback(), sslsocketpair(), TEST(), and TEST_F().
std::string folly::getFileAsBuf | ( | const char * | fileName | ) |
Definition at line 179 of file AsyncSSLSocketTest.cpp.
References buffer(), readFile(), and string.
Referenced by TEST().
boost::program_options::options_description folly::getGFlags | ( | ProgramOptionsStyle | style | ) |
Definition at line 270 of file ProgramOptions.cpp.
References folly::NestedCommandLineParseResult::command, f, folly::gen::move, folly::NestedCommandLineParseResult::options, parser, folly::NestedCommandLineParseResult::rest, and tokens.
Referenced by folly::NestedCommandLineApp::addGFlags(), and main().
size_t folly::getGlobalBenchmarkBaselineIndex | ( | ) |
Definition at line 92 of file Benchmark.cpp.
References folly::detail::addBenchmarkImpl(), folly::test::begin(), benchmarks(), folly::test::end(), FB_FOLLY_GLOBAL_BENCHMARK_BASELINE, FB_STRINGIZE_X2, fun(), folly::gen::move, folly::detail::BenchmarkRegistration::name, and name.
Referenced by runBenchmarks().
const HugePageSize * folly::getHugePageSize | ( | size_t | size = 0 | ) |
Return the mount point for the requested huge page size. 0 = use smallest available. Returns nullptr if the requested huge page size is not available.
Definition at line 206 of file HugePages.cpp.
References getHugePageSizes().
const HugePageSize * folly::getHugePageSizeForDevice | ( | dev_t | device | ) |
Return the huge page size for a device. returns nullptr if device does not refer to a huge page filesystem.
Definition at line 219 of file HugePages.cpp.
References getHugePageSizes().
Referenced by folly::MemoryMapping::MemoryMapping().
const HugePageSizeVec & folly::getHugePageSizes | ( | ) |
Get list of supported huge page sizes and their mount points, if hugetlbfs file systems are mounted for those sizes.
Definition at line 201 of file HugePages.cpp.
References sizes.
Referenced by getHugePageSize(), and getHugePageSizeForDevice().
std::shared_ptr< IOExecutor > folly::getIOExecutor | ( | ) |
Retrieve the global IOExecutor. If there is none, a default IOThreadPoolExecutor will be constructed and returned.
IOExecutors differ from Executors in that they drive and provide access to one or more EventBases.
Can return nullptr on shutdown.
Definition at line 103 of file GlobalExecutor.cpp.
References singleton.
Referenced by folly::IOObjectCache< T >::get(), getEventBase(), and TEST().
Executor::KeepAlive<ExecutorT> folly::getKeepAliveToken | ( | ExecutorT * | executor | ) |
Returns a keep-alive token which guarantees that Executor will keep processing tasks until the token is released (if supported by Executor). KeepAlive always contains a valid pointer to an Executor.
Definition at line 200 of file Executor.h.
References folly::Executor::getKeepAliveToken(), and value.
Referenced by keepAliveTest(), RecursiveAddTest(), folly::fibers::ExecutorLoopController::runLoop(), folly::fibers::EventBaseLoopController::runLoop(), folly::fibers::ExecutorLoopController::schedule(), folly::fibers::EventBaseLoopController::schedule(), folly::fibers::ExecutorLoopController::scheduleThreadSafe(), folly::fibers::EventBaseLoopController::scheduleThreadSafe(), folly::futures::detail::Core< T >::setExecutor(), SimpleTest(), folly::SemiFuture< T >::stealDeferredExecutor(), TEST(), folly::SemiFuture< T >::via(), folly::Future< T >::via(), folly::futures::detail::waitViaImpl(), and window().
Executor::KeepAlive<ExecutorT> folly::getKeepAliveToken | ( | ExecutorT & | executor | ) |
Definition at line 208 of file Executor.h.
References folly::Executor::getKeepAliveToken(), and value.
|
inline |
Definition at line 40 of file Event.h.
References folly::netops::detail::SocketFileDescriptorMap::fdToSocket().
Referenced by folly_event_set().
|
static |
Definition at line 47 of file TimeUtil.cpp.
References errnoStr(), f, FILE, folly::Range< Iter >::find(), int64_t, SCOPE_EXIT, and folly::Range< Iter >::subpiece().
|
inline |
Get the operating-system level thread ID for the current thread.
The returned value will uniquely identify this thread on the system.
This makes it more suitable for logging or displaying in user interfaces than the result of getCurrentThreadID().
There are some potential caveats about this API, however:
On Linux the returned value is a pid_t, and can be used in contexts requiring a thread pid_t.
The thread ID may be reused once the thread it corresponds to has been joined.
Definition at line 80 of file ThreadId.h.
References FOLLY_SYS_gettid, and uint64_t.
Referenced by folly::LogMessage::LogMessage(), folly::TimePoint::reset(), and TEST().
|
static |
Determine how long this process has spent waiting to get scheduled on the CPU.
Returns the number of nanoseconds spent waiting, or -1 if the amount of time cannot be determined.
Definition at line 160 of file TimeUtil.cpp.
References folly::netops::close(), int64_t, fizz::detail::read(), and uint64_t.
Referenced by folly::TimePoint::reset().
SyncVecThreadPoolExecutors& folly::getSyncVecThreadPoolExecutors | ( | ) |
Definition at line 27 of file ThreadPoolExecutor.cpp.
References DEFINE_int64().
Referenced by folly::ThreadPoolExecutor::ThreadPoolExecutor(), folly::ThreadPoolExecutor::withAll(), and folly::ThreadPoolExecutor::~ThreadPoolExecutor().
|
static |
Returns the best real CacheLocality information available.
Definition at line 36 of file CacheLocality.cpp.
References kIsLinux, folly::CacheLocality::readFromSysfs(), and folly::CacheLocality::uniform().
Referenced by CacheLocality::system< std::atomic >().
Optional< std::string > folly::getThreadName | ( | std::thread::id | tid | ) |
Get the name of the given thread, or nothing if an error occurs or the functionality is not available.
Definition at line 90 of file ThreadName.cpp.
References make_optional(), and string.
Referenced by folly::EventBase::checkIsInEventBaseThread(), getCurrentThreadName(), and TEST().
|
static |
Definition at line 241 of file EventBase.cpp.
References now().
Referenced by folly::EventBase::loopBody().
folly::StringPiece folly::getXlogCategoryNameForFile | ( | folly::StringPiece | filename | ) |
Get the default XLOG() category name for the given filename.
This function returns the category name that will be used by XLOG() if XLOG_SET_CATEGORY_NAME() has not been used.
Definition at line 57 of file xlog.cpp.
References folly::Range< Iter >::startsWith().
Referenced by folly::XlogCategoryInfo< IsInHeaderFile >::init(), folly::XlogLevelInfo< IsInHeaderFile >::loadLevelFull(), and TEST_F().
Definition at line 114 of file Crc32CombineDetail.cpp.
Referenced by folly::detail::crc32_combine_hw().
Definition at line 111 of file Crc32CombineDetail.cpp.
Referenced by folly::detail::crc32c_combine_hw().
Definition at line 41 of file Crc32CombineDetail.cpp.
References gf_multiply_sw_1().
Referenced by folly::detail::crc32_combine_sw(), folly::detail::crc32c_combine_sw(), and gf_square_sw().
|
static |
Definition at line 31 of file Crc32CombineDetail.cpp.
Referenced by gf_multiply_sw().
Definition at line 45 of file Crc32CombineDetail.cpp.
References gf_multiply_sw().
JemallocNodumpAllocator & folly::globalJemallocNodumpAllocator | ( | ) |
JemallocNodumpAllocator singleton.
Definition at line 163 of file JemallocNodumpAllocator.cpp.
References folly::JemallocNodumpAllocator::JemallocNodumpAllocator().
std::atomic<EventBaseManager*> folly::globalManager | ( | nullptr | ) |
Referenced by folly::EventBaseManager::get().
|
inlinenoexcept |
Definition at line 201 of file Malloc.h.
References nallocx, and usingJEMalloc().
Referenced by folly::fbvector< HTTPHeaderCode >::computeInsertCapacity(), folly::fbstring_core< Char >::copyMedium(), folly::fbstring_core< Char >::RefCounted::create(), folly::IOBuf::createCombined(), folly::fbvector< T, Allocator >::emplace_back_aux(), folly::IOBuf::goodExtBufferSize(), folly::ArenaAllocatorTraits< SysAllocator< void > >::goodSize(), folly::fbvector< T, Allocator >::Impl::init(), folly::fbstring_core< Char >::initMedium(), folly::small_vector< Observer< T > *, InlineObservers >::makeSizeInternal(), folly::fbstring_core< Char >::RefCounted::reallocate(), folly::fbvector< HTTPHeaderCode >::reserve(), folly::fbvector< HTTPHeaderCode >::reserve_in_place(), folly::fbstring_core< Char >::reserveMedium(), folly::fbstring_core< Char >::reserveSmall(), folly::fbvector< HTTPHeaderCode >::shrink_to_fit(), and TEST().
bool folly::greater_than | ( | LHS const | lhs | ) |
size_t folly::hash_value | ( | const IPAddressV4 & | addr | ) |
size_t folly::hash_value | ( | const IPAddress & | addr | ) |
Definition at line 34 of file IPAddress.cpp.
Referenced by folly::IPAddressV4::AddressStorage::AddressStorage().
std::size_t folly::hash_value | ( | const IPAddressV6 & | addr | ) |
size_t folly::hash_value | ( | const SocketAddress & | address | ) |
Hash a SocketAddress object.
boost::hash uses hash_value(), so this allows boost::hash to automatically work for SocketAddress.
Definition at line 771 of file SocketAddress.cpp.
References folly::SocketAddress::hash().
|
noexcept |
hazptr_cleanup
hazptr_cleanup: Reclaims all reclaimable objects retired to the domain
Definition at line 384 of file HazptrDomain.h.
Referenced by cleanup_bench(), run_once(), and TEST().
|
noexcept |
hazptr_domain_push_retired
hazptr_domain_push_retired: push a list of retired objects into a domain
Definition at line 369 of file HazptrDomain.h.
References Atom, check(), D, and T.
Referenced by folly::hazptr_obj< Atom >::push_to_retired().
hazptr_priv<Atom>& folly::hazptr_priv_tls | ( | ) |
hazptr_priv_tls
void folly::hazptr_retire | ( | T * | obj, |
D | reclaim | ||
) |
FOLLY_ALWAYS_INLINE void folly::hazptr_retire | ( | T * | obj, |
D | reclaim | ||
) |
hazptr_tc_tls
std::string folly::hexDump | ( | const void * | ptr, |
size_t | size | ||
) |
Return the hex dump of size bytes starting at ptr as a string.
Definition at line 457 of file String.cpp.
References hexDump().
void folly::hexDump | ( | const void * | ptr, |
size_t | size, | ||
OutIt | out | ||
) |
Write a hex dump of size bytes starting at ptr to out.
The hex dump is formatted as follows:
for the string "abcdefghijklmnopqrstuvwxyz\x02" 00000000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 |abcdefghijklmnop| 00000010 71 72 73 74 75 76 77 78 79 7a 02 |qrstuvwxyz. |
that is, we write 16 bytes per line, both as hex bytes and as printable characters. Non-printable characters are replaced with '.' Lines are written to out one by one (one StringPiece at a time) without delimiters.
Definition at line 645 of file String-inl.h.
References folly::detail::hexDumpLine(), and string.
Referenced by hexDump(), proxygen::HexFollyPrinter::print(), and TEST().
OutputString folly::hexlify | ( | ByteRange | input | ) |
OutputString folly::hexlify | ( | StringPiece | input | ) |
bool folly::hexlify | ( | const InputString & | input, |
OutputString & | output, | ||
bool | append = false |
||
) |
Same functionality as Python's binascii.hexlify. Returns true on successful conversion.
If append_output is true, append data to the output rather than replace it.
Definition at line 596 of file String-inl.h.
Referenced by BENCHMARK(), fizz::test::HandshakeTypesTest::encodeHex(), fizz::test::ZlibCertificateCompressorTest::encodeHex(), fizz::enumToHex(), fizz::test::PlaintextRecordTest::expectSame(), fizz::test::RecordTest::expectSame(), fizz::test::EncryptedRecordTest::expectSame(), folly::AsyncSSLSocket::getSSLClientCiphers(), hexlify(), humanify(), fizz::PlaintextReadRecordLayer::read(), fizz::server::test::TEST(), fizz::test::TEST(), TEST(), fizz::server::test::TEST_F(), fizz::test::TEST_F(), fizz::testing::TEST_P(), fizz::test::TEST_P(), and TEST_P().
hint_emplace_iterator<Container, implicit_unpack> folly::hint_emplacer | ( | Container & | c, |
typename Container::iterator | i | ||
) |
Convenience function to construct a folly::hint_emplace_iterator, analogous to std::inserter().
Setting implicit_unpack to false will disable implicit unpacking of single std::pair and std::tuple arguments to the iterator's operator=. That may be desirable in case of constructors that expect a std::pair or std::tuple argument.
Definition at line 461 of file Iterator.h.
References c, and folly::gen::move.
Referenced by TEST().
std::uint32_t folly::hsieh_hash32_buf | ( | const void * | buf, |
std::size_t | len | ||
) |
String folly::humanify | ( | const String & | input | ) |
Definition at line 240 of file String.h.
References append(), hexlify(), humanify(), and gmock_output_test::output.
void folly::humanify | ( | const String1 & | input, |
String2 & | output | ||
) |
Take a string and "humanify" it – that is, make it look better. Since "better" is subjective, caveat emptor. The basic approach is to count the number of unprintable characters. If there are none, then the output is the input. If there are relatively few, or if there is a long "enough" prefix of printable characters, use backslashify. If it is mostly binary, then simply hex encode.
This is an attempt to make a computer smart, and so likely is wrong most of the time.
Definition at line 552 of file String-inl.h.
References backslashify(), c, and hexlify().
Referenced by backslashify(), humanify(), and TEST().
|
static |
Definition at line 227 of file Benchmark.cpp.
References folly::ScaleInfo::boundary, stringPrintf(), folly::ScaleInfo::suffix, and suffix.
Referenced by metricReadable(), and readableTime().
|
inline |
Definition at line 235 of file Utility.h.
Referenced by destroy< IOThreadPoolExecutor >(), folly::futures::detail::Core< T >::make(), make_replaceable(), makeExpected(), folly::symbolizer::Symbolizer::Symbolizer(), TEST(), TEST(), and folly::sync_tests::testInPlaceConstruction().
|
inline |
|
inline |
void folly::init | ( | int * | argc, |
char *** | argv, | ||
bool | removeFlags | ||
) |
Definition at line 34 of file Init.cpp.
References initLoggingOrDie(), folly::symbolizer::installFatalSignalCallbacks(), folly::symbolizer::installFatalSignalHandler(), folly::SingletonVault::registrationComplete(), and folly::SingletonVault::singleton().
Referenced by folly::portability::ssl::BIO_set_init(), wangle::FilePoller::FilePoller(), folly::Init::Init(), inline_bulk_target(), folly::XlogCategoryInfo< IsInHeaderFile >::isInitialized(), main(), naive_executor_bulk_target(), folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=(), folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=(), folly::NotificationQueue< MessageT >::Consumer::setActive(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Skipper::Skipper(), folly::NotificationQueue< MessageT >::Consumer::startConsuming(), folly::NotificationQueue< MessageT >::Consumer::startConsumingInternal(), and proxygen::ZlibStreamDecompressor::ZlibStreamDecompressor().
void folly::initializeLoggerDB | ( | LoggerDB & | db | ) |
initializeLoggerDB() will be called to configure the main LoggerDB singleton the first time that LoggerDB::get() is called.
This function can be used apply basic default settings to the LoggerDB, including default log level and log handler settings.
A default implementation is provided as a weak symbol, so it can be overridden on a per-program basis if you want to customize the initial LoggerDB settings for your program.
However, note that this function may be invoked before main() starts (if other code that runs before main uses the logging library). Therefore you should be careful about what code runs here. For instance, you probably should not create LogHandler objects that spawn new threads. It is generally a good idea to defer more complicated setup until after main() starts.
In most situations it is normally better to override getBaseLoggingConfig() from logging/Init.h rather than overriding initializeLoggerDB(). You only need to override initializeLoggerDB() if you want to change the settings that are used for messages that get logged before initLogging() is called.
The default implementation configures the root log category to write all warning and higher-level log messages to stderr, using a format similar to that used by GLOG.
Definition at line 43 of file LoggerDB.cpp.
References config, db_, FOLLY_NONNULL, kDefaultLogLevel, folly::LoggerDB::registerHandlerFactory(), and folly::LoggerDB::updateConfig().
void folly::initLogging | ( | folly::StringPiece | configString = "" | ) |
Initialize the logging library.
This function performs the following steps:
This function will throw an exception on error. Most errors are normally due to invalid logging configuration strings: e.g., invalid log level names or referencing undefined log handlers.
If you are invoking this from your program's main() function it is often more convenient to use initLoggingOrDie() to terminate your program gracefully on error rather than having to handle exceptions yourself.
Definition at line 25 of file Init.cpp.
References config, folly::Range< Iter >::empty(), folly::LoggerDB::get(), getBaseLoggingConfig(), parseLogConfig(), folly::LogConfig::update(), and folly::LoggerDB::updateConfig().
Referenced by initLoggingOrDie(), and TEST().
void folly::initLoggingOrDie | ( | folly::StringPiece | configString = "" | ) |
Initialize the logging library, and exit the program on error.
This function behaves like initLogging(), but if an error occurs processing the logging configuration it will print an error message to stderr and then call exit(1) to terminate the program.
Definition at line 48 of file Init.cpp.
References initLogging().
Referenced by init().
|
noexcept |
Definition at line 49 of file Invoke.h.
References testing::Args(), C, f, and M.
Referenced by folly::FunctionRef< ReturnType(Args...)>::call(), folly::basic_once_flag< SharedMutex >::call_once_slow(), folly::futures::detail::detail_msvc_15_7_workaround::invoke(), folly::detail::apply_tuple::adl::ApplyInvoke::invoke_(), folly::detail::partial::Partial< F, Tuple >::invokeForward(), TEST_F(), and folly::futures::detail::CoreCallbackState< T, F >::tryInvoke().
constexpr auto folly::invoke | ( | MC::* | d, |
Args &&... | args | ||
) | -> decltype(std::mem_fn(d)(static_cast<Args&&>(args)...)) |
Definition at line 55 of file Invoke.h.
References testing::Args().
FOLLY_NOINLINE FOLLY_COLD void folly::invoke_noreturn_cold | ( | F && | f, |
A &&... | a | ||
) |
invoke_noreturn_cold
Invoke the provided function with the provided arguments. If the invocation returns, terminate.
May be used with throw_exception in cases where construction of the object to be thrown requires more than just invoking its constructor with a given sequence of arguments passed by reference - for example, if a string message must be computed before being passed to the constructor of the object to be thrown.
Usage note: Passing extra values as arguments rather than capturing them allows smaller bytecode at the call-site.
Example:
if (i < 0) { invoke_noreturn_cold( [](int j) { throw_exceptions(runtime_error(to<string>("invalid: ", j))); }, i); }
Definition at line 122 of file Exception.h.
Referenced by TEST_F().
constexpr bool folly::is_negative | ( | T | x | ) |
Definition at line 675 of file Traits.h.
Referenced by folly::FormatValue< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value >::type >::doFormat(), testing::gmock_matchers_test::Type< T >::IsTypeOf(), TEST(), and testing::gmock_matchers_test::TEST().
constexpr bool folly::is_non_negative | ( | T | x | ) |
Definition at line 693 of file Traits.h.
constexpr bool folly::is_non_positive | ( | T | x | ) |
|
inlinestatic |
Definition at line 127 of file String.cpp.
Referenced by ltrimWhitespace(), and rtrimWhitespace().
constexpr bool folly::is_positive | ( | T | x | ) |
Definition at line 687 of file Traits.h.
Referenced by testing::gmock_matchers_test::Type< T >::IsTypeOf(), and testing::gmock_matchers_test::TEST().
|
inline |
Returns true if and only if a LogLevel is fatal.
Definition at line 145 of file LogLevel.h.
References DFATAL, FATAL, and kIsDebug.
Referenced by folly::LogCategory::admitMessage().
|
inline |
Definition at line 161 of file Bits.h.
References value.
Referenced by BENCHMARK(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::ConcurrentHashMapSegment(), and TEST().
bool folly::isSequencedExecutor | ( | folly::Executor & | executor | ) |
Definition at line 27 of file SequencedExecutorTest.cpp.
References folly::Executor::add(), folly::SerialExecutor::create(), folly::Executor::getKeepAliveToken(), and folly::fibers::yield().
Referenced by testExecutor().
|
inline |
Definition at line 119 of file AsyncTransport.h.
References b.
Referenced by wangle::AsyncSocketHandler::close(), folly::AsyncSocket::SendMsgParamsCallback::getDefaultFlags(), folly::AsyncSocket::isZeroCopyRequest(), folly::AsyncSSLSocket::performWrite(), TEST(), and TestAsyncTransport::writev().
void folly::join | ( | const Delim & | delimiter, |
Iterator | begin, | ||
Iterator | end, | ||
String & | output | ||
) |
Definition at line 498 of file String-inl.h.
References folly::detail::internalJoin(), and folly::detail::prepareDelim().
Referenced by BENCHMARK(), BENCHMARK_RELATIVE(), checkResplitMaxLength(), folly::StandardLogHandlerFactory::createHandler(), folly::IPAddressV4::fromInverseArpaName(), proxygen::HTTP1xCodec::generateHeader(), wangle::SSLContextConfig::getDefaultCiphers(), folly::AsyncSSLSocket::getSSLClientComprMethods(), folly::AsyncSSLSocket::getSSLClientExts(), folly::AsyncSSLSocket::getSSLClientSupportedVersions(), folly::test::IovecBuffers::join(), join(), operator<<(), folly::SSLContext::setCipherList(), folly::SSLContext::setClientECCurvesList(), folly::SSLContext::setSignatureAlgorithms(), stripLeftMargin(), TEST(), TEST_F(), and folly::IPAddressV6::toInverseArpaName().
void folly::join | ( | const Delim & | delimiter, |
const Container & | container, | ||
String & | output | ||
) |
Definition at line 511 of file String.h.
References join(), and gmock_output_test::output.
void folly::join | ( | const Delim & | delimiter, |
const std::initializer_list< Value > & | values, | ||
String & | output | ||
) |
Definition at line 516 of file String.h.
References join(), and gmock_output_test::output.
std::string folly::join | ( | const Delim & | delimiter, |
const Container & | container | ||
) |
Definition at line 524 of file String.h.
References join(), gmock_output_test::output, and string.
std::string folly::join | ( | const Delim & | delimiter, |
const std::initializer_list< Value > & | values | ||
) |
Definition at line 531 of file String.h.
References join(), gmock_output_test::output, string, type, and value().
std::string folly::join | ( | const Delim & | delimiter, |
Iterator | begin, | ||
Iterator | end | ||
) |
Definition at line 546 of file String.h.
References join(), ltrimWhitespace(), gmock_output_test::output, rtrimWhitespace(), and string.
|
static |
|
inlinenoexcept |
Approximate backport from C++17 of std::launder. It should be constexpr
but that can't be done without specific support from the compiler.
Definition at line 48 of file Launder.h.
References testing::Args(), and T.
Referenced by folly::Replaceable< T >::emplace(), folly::Replaceable< T >::operator*(), folly::Replaceable< T >::operator->(), folly::replaceable_detail::move_assignment_mixin< T, true >::operator=(), folly::replaceable_detail::copy_assignment_mixin< T, true >::operator=(), TEST(), and folly::replaceable_detail::dtor_mixin< T, true, false >::~dtor_mixin().
|
delete |
|
delete |
|
delete |
|
delete |
|
delete |
auto folly::lazy | ( | Func && | fun | ) |
bool folly::less_than | ( | LHS const | lhs | ) |
|
inline |
Definition at line 44 of file Event.h.
References folly::netops::detail::SocketFileDescriptorMap::socketToFd().
Referenced by folly::AsyncTimeout::libeventCallback().
|
inline |
Read an unaligned value of type T and return it.
Definition at line 298 of file Bits.h.
References kHasUnalignedAccess, T, and value().
auto folly::lock | ( | Synchronized< D, M > & | synchronized, |
Args &&... | args | ||
) |
Definition at line 1531 of file Synchronized.h.
References testing::Args(), D, folly::detail::lock(), and M.
Referenced by folly::python::GILAwareManualExecutor::add(), folly::ManualExecutor::add(), folly::DefaultKeepAliveExecutor::WeakRef::add(), folly::DefaultKeepAliveExecutor::WeakRef::addWithPriority(), BENCHMARK(), folly::basic_once_flag< SharedMutex >::call_once_slow(), folly::ManualExecutor::clear(), folly::ThreadedExecutor::controlWait(), folly::python::GILAwareManualExecutor::driveImpl(), folly::EventBase::EventBase(), folly::symbolizer::ElfCache::getFile(), folly::futures::detail::Core< T >::getInterruptHandler(), folly::AsyncIO::initializeContext(), folly::MicroLockBase< MaxSpins, MaxYields >::lock(), lock(), folly::futures::detail::Core< T >::raise(), folly::ManualExecutor::run(), folly::FunctionScheduler::run(), runBasicHoldersTest(), runBasicTest(), runBasicUpgradeTest(), runContendedReaders(), runFailingTryTimeoutTest(), runManyReadLocksTestWithoutTokens(), runManyReadLocksTestWithTokens(), runMixed(), runTimeoutInPastTest(), folly::ManualExecutor::scheduleAt(), folly::futures::detail::Core< T >::setInterruptHandler(), folly::pushmi::shared_entangle(), folly::ThreadedRepeatingFunctionRunner::stopImpl(), synchronized(), folly::futures::test::TEST(), TEST(), TEST(), TEST_F(), folly::PicoSpinLock< uintptr_t >::try_lock(), folly::PicoSpinLock< uintptr_t >::unlock(), unorderedReduce(), folly::ManualExecutor::wait(), folly::python::GILAwareManualExecutor::waitBeforeDrive(), folly::ThreadedRepeatingFunctionRunner::waitFor(), folly::HandshakeCallback::waitForHandshake(), with_unique_lock(), folly::SynchronizedBase< Subclass, detail::MutexLevel::UNIQUE >::withLock(), folly::SynchronizedBase< Subclass, detail::MutexLevel::UNIQUE >::withLockPtr(), and folly::EventBase::~EventBase().
auto folly::lock | ( | const Synchronized< D, M > & | synchronized, |
Args &&... | args | ||
) |
Definition at line 1535 of file Synchronized.h.
References folly::detail::lock().
void folly::lock | ( | LockableOne & | one, |
LockableTwo & | two, | ||
Lockables &... | lockables | ||
) |
Acquire locks on many lockables or synchronized instances in such a way that the sequence of calls within the function does not cause deadlocks.
This can often result in a performance boost as compared to simply acquiring your locks in an ordered manner. Even for very simple cases. The algorithm tried to adjust to contention by blocking on the mutex it thinks is the best fit, leaving all other mutexes open to be locked by other threads. See the benchmarks in folly/test/SynchronizedBenchmark.cpp for more
This works differently as compared to the locking algorithm in libstdc++ and is the recommended way to acquire mutexes in a generic order safe manner. Performance benchmarks show that this does better than the one in libstdc++ even for the simple cases
Usage is the same as std::lock() for arbitrary lockables
folly::lock(one, two, three);
To make it work with folly::Synchronized you have to specify how you want the locks to be acquired, use the folly::wlock(), folly::rlock(), folly::ulock() and folly::lock() helpers defined below
auto [one, two] = lock(folly::wlock(a), folly::rlock(b));
Note that you can/must avoid the folly:: namespace prefix on the lock() function if you use the helpers, ADL lookup is done to find the lock function
This will execute the deadlock avoidance algorithm and acquire a write lock for a and a read lock for b
Definition at line 1592 of file Synchronized.h.
References for_each(), lock(), folly::ssl::detail::locks(), and folly::detail::makeSynchronizedLocker().
Referenced by folly::LockedPtrBase< SynchronizedType, SynchronizedType::MutexType, LockPolicy >::LockedPtrBase(), folly::LockedPtrBase< SynchronizedType, std::mutex, LockPolicy >::LockedPtrBase(), and folly::LockedPtrBase< SynchronizedType, SynchronizedType::MutexType, LockPolicy >::reacquireLock().
Convert a LogConfig object to a folly::dynamic object.
This can be used to serialize it as a JSON string, which can later be read back using parseLogConfigJson().
Definition at line 553 of file LogConfigParser.cpp.
References folly::LogConfig::getCategoryConfigs(), folly::LogConfig::getHandlerConfigs(), folly::dynamic::insert(), folly::gen::move, and folly::dynamic::object().
Referenced by TEST().
dynamic folly::logConfigToDynamic | ( | const LogHandlerConfig & | config | ) |
Definition at line 568 of file LogConfigParser.cpp.
References folly::Optional< Value >::hasValue(), folly::dynamic::insert(), folly::gen::move, folly::dynamic::object(), folly::LogHandlerConfig::options, folly::LogHandlerConfig::type, and folly::Optional< Value >::value().
dynamic folly::logConfigToDynamic | ( | const LogCategoryConfig & | config | ) |
Definition at line 580 of file LogConfigParser.cpp.
References folly::dynamic::array(), folly::LogCategoryConfig::handlers, folly::Optional< Value >::hasValue(), folly::LogCategoryConfig::inheritParentLevel, folly::LogCategoryConfig::level, logLevelToString(), folly::gen::move, folly::dynamic::object(), value(), and folly::Optional< Value >::value().
|
noexcept |
|
inlinenoexcept |
logDisabledHelper() is invoked in FB_LOG() and XLOG() statements if the log admittance check fails.
This function exists solely to ensure that both sides of the log check are marked [[noreturn]] for fatal log messages. This allows the compiler to recognize that the full statement is noreturn, preventing warnings about missing return statements after fatal log messages.
Unfortunately it does not appear possible to get the compiler to recognize that the disabled side of the log statement should never be reached for fatal messages. Even if we make the check something like (isLogLevelFatal(level) || realCheck)
, where isLogLevelFatal() is constexpr, this is not sufficient for gcc or clang to recognize that the full expression is noreturn.
Ideally this would just be a template function specialized on a boolean IsFatal parameter. Unfortunately this triggers a bug in clang, which does not like differing noreturn behavior for different template instantiations. Therefore we overload on integral_constant instead.
clang-format also doesn't do a good job understanding this code and figuring out how to format it.
Definition at line 520 of file LogStreamProcessor.h.
References logDisabledHelper(), and folly::pushmi::__adl::noexcept().
|
noexcept |
Definition at line 25 of file printf.cpp.
References format(), SCOPE_EXIT, and stringVPrintf().
|
noexcept |
std::string folly::logLevelToString | ( | LogLevel | level | ) |
Get a human-readable string representing the LogLevel.
Definition at line 109 of file LogLevel.cpp.
References CRITICAL, DBG, DFATAL, ERR, FATAL, INFO, deadlock::info(), NONE, uint32_t, UNINITIALIZED, and WARN.
Referenced by logConfigToDynamic(), operator-=(), operator<<(), and TEST().
StringPiece folly::ltrimWhitespace | ( | StringPiece | sp | ) |
Returns a subpiece with all whitespace removed from the front of . Whitespace means any of [' ', '
', '', ''].
Definition at line 131 of file String.cpp.
References folly::Range< Iter >::empty(), folly::Range< Iter >::front(), is_oddspace(), and folly::Range< Iter >::pop_front().
Referenced by join(), proxygen::compress::prepareMessageForCompression(), skipWhitespace(), TEST(), and trimWhitespace().
constexpr array_detail::return_type<D, TList...> folly::make_array | ( | TList &&... | t | ) |
constexpr auto folly::make_array_with | ( | MakeItem const & | make | ) |
Definition at line 75 of file Array.h.
References folly::array_detail::make_array_with().
Referenced by TEST().
|
noexcept |
Definition at line 92 of file Iterator.h.
References testing::Args().
Referenced by TEST().
exception_wrapper folly::make_exception_wrapper | ( | As &&... | as | ) |
exception_wrapper
that wraps an instance of type Ex
that has been constructed with arguments std::forward<As>(as)...
. Definition at line 626 of file ExceptionWrapper.h.
References folly::gen::as().
constexpr T folly::make_from_tuple | ( | Tuple && | t | ) |
Definition at line 204 of file ApplyTuple.h.
References apply(), and folly::pushmi::detail::t.
Referenced by uncurry().
Definition at line 450 of file Optional.h.
References testing::Args(), T, and v.
Referenced by getThreadName(), TEST(), TEST(), and folly::Optional< NamedGroup >::value_or().
constexpr folly::Optional<T> folly::make_optional | ( | Args &&... | args | ) |
constexpr folly::Optional<T> folly::make_optional | ( | std::initializer_list< U > | il, |
Args &&... | args | ||
) |
Definition at line 463 of file Optional.h.
constexpr Replaceable<std::decay_t<T> > folly::make_replaceable | ( | T && | t | ) |
Definition at line 385 of file Replaceable.h.
References testing::Args(), folly::pushmi::detail::t, and T.
constexpr Replaceable<T> folly::make_replaceable | ( | Args &&... | args | ) |
constexpr Replaceable<T> folly::make_replaceable | ( | std::initializer_list< U > | il, |
Args &&... | args | ||
) |
std::enable_if<!std::is_array<T>::value, std::unique_ptr<T> >::type folly::make_unique | ( | Args &&... | args | ) |
For exception safety and consistency with make_shared. Erase me when we have std::make_unique().
Definition at line 259 of file Memory.h.
References T, type, and value.
Referenced by make_unique(), runMtProdCons(), runMtProdConsDeterministic(), runMtProdConsDeterministicDynamic(), runMtProdConsEmulatedFutex(), folly::futures::detail::DeferredExecutor::setNestedExecutors(), GenericFilterTest< Owned >::SetUp(), TEST(), TEST_F(), and times().
std::enable_if<std::is_array<T>::value, std::unique_ptr<T> >::type folly::make_unique | ( | const size_t | n | ) |
Definition at line 266 of file Memory.h.
References testing::Args(), make_unique(), T, type, and value.
|
delete |
Referenced by allocationBytesForOverAligned().
auto folly::makeAutoTimer | ( | std::string && | msg = "" , |
const std::chrono::duration< double > & | minTimeToLog = std::chrono::duration<double>::zero() , |
||
Logger && | logger = Logger() |
||
) |
BitIterator<BaseIter> folly::makeBitIterator | ( | const BaseIter & | iter | ) |
Helper function, so you can write auto bi = makeBitIterator(container.begin());
Definition at line 161 of file BitIterator.h.
Referenced by folly::HHWheelTimer::Callback::cancelTimeoutImpl(), folly::HHWheelTimer::scheduleNextTimeout(), folly::HHWheelTimer::scheduleTimeoutImpl(), TEST(), TEST_P(), and folly::HHWheelTimer::timeoutExpired().
folly::Function< void(double)> folly::makeCompressionCounterHandler | ( | folly::io::CodecType | codecType, |
folly::StringPiece | codecName, | ||
folly::Optional< int > | level, | ||
CompressionCounterKey | key, | ||
CompressionCounterType | counterType | ||
) |
This functions is an extension point when FOLLY_HAVE_WEAK_SYMBOLS is true. There is a default no-op implementation provided which can be overrided by linking in a library which provides its own definition.
codecType | The type of the codec for this counter. |
codecName | The name of the codec for this counter. If the codecName is empty it should be defaulted using the codecType. |
level | Optionally the level used to construct the codec. |
key | The key of the counter. |
counterType | The type of the counter. |
Definition at line 21 of file Counters.cpp.
Referenced by folly::detail::CompressionCounter::CompressionCounter().
ConversionError folly::makeConversionError | ( | ConversionCode | code, |
StringPiece | input | ||
) |
Definition at line 765 of file Conv.cpp.
References folly::Range< Iter >::data(), folly::Range< Iter >::empty(), EMPTY_INPUT_STRING, folly::Range< Iter >::size(), string, type, and value().
Referenced by folly::detail::enforceWhitespace(), and to().
constexpr Expected< typename std::decay< Value >::type, Error > folly::makeExpected | ( | Value && | val | ) |
For constructing an Expected object from a value, with the specified Error type. Usage is as follows:
enum MyErrorCode { BAD_ERROR, WORSE_ERROR }; Expected<int, MyErrorCode> myAPI() { int i = // ...; return i ? makeExpected<MyErrorCode>(i) : makeUnexpected(BAD_ERROR); }
Definition at line 1394 of file Expected.h.
References testing::Args(), folly::Optional< Value >::emplace(), folly::Expected< Value, Error >::error(), h, folly::Expected< Value, Error >::hasValue(), in_place(), makeUnexpected(), folly::gen::move, folly::pushmi::__adl::noexcept(), operator!=(), operator==(), operator>(), operator>=(), promise_, val, folly::Expected< Value, Error >::value(), and testing::Value().
|
noexcept |
Construct a BasicFixedString
object from a null-terminated array of characters. The capacity and size of the string will be equal to one less than the size of the array.
a
contains no embedded null characters. a[N-1] == Char(0)
s
, s[i]==a[i]
for every i
in [0
,N-1
]. Definition at line 2991 of file FixedString.h.
References a.
Referenced by TEST().
Make a completed Future by moving in a value. e.g.
string foo = "foo"; auto f = makeFuture(std::move(foo));
or
auto f = makeFuture<string>("foo");
NOTE: This function is deprecated. Please use makeSemiFuture and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1310 of file Future-inl.h.
References folly::Future< T >::makeFuture, folly::pushmi::detail::t, and type.
Referenced by fizz::server::test::ServerProtocolTest::acceptEarlyData(), aFunction(), folly::SomeClass::aMethod(), folly::SomeClass::aStaticMethod(), aStdFunction(), BENCHMARK(), BENCHMARK_RELATIVE(), call(), wangle::Service< std::string, std::string >::close(), wangle::CloseOnReleaseFilter< Req, Resp >::close(), wangle::AsyncSocketHandler::close(), complexBenchmark(), fizz::server::DualTicketCipher::decrypt(), MultiFilePollerTest::delayedWrite(), doWorkStatic(), doWorkStaticFuture(), doWorkStaticTry(), fGen(), wangle::ContextImpl< H >::fireClose(), wangle::OutboundContextImpl< H >::fireClose(), wangle::ContextImpl< H >::fireWrite(), wangle::OutboundContextImpl< H >::fireWrite(), wangle::ContextImpl< H >::fireWriteException(), wangle::OutboundContextImpl< H >::fireWriteException(), folly::Future< folly::folly::Unit >::Future(), futureExecutor(), folly::futures::map(), recursion(), removeThreadTest(), folly::futures::detail::retryingPolicyCappedJitteredExponentialBackoff(), wangle::AsyncSocketHandler::shutdown(), someFuture(), TEST(), TEST_F(), fizz::server::test::TEST_F(), throwAndCatchImpl(), throwAndCatchWrappedImpl(), throwWrappedAndCatchImpl(), throwWrappedAndCatchWrappedImpl(), TYPED_TEST(), WeakRefTest(), wangle::MessageToByteEncoder< T >::write(), wangle::test::BytesReflector::write(), wangle::AsyncSocketHandler::write(), and ConcreteHandler< Rin, Rout, Win, Wout >::write().
Make a completed void Future.
NOTE: This function is deprecated. Please use makeSemiFuture and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1314 of file Future-inl.h.
References folly::Future< T >::makeFuture, type, and folly::futures::detail::FutureBase< T >::value().
Make a failed Future from an exception_ptr. Because the Future's type cannot be inferred you have to specify it, e.g.
auto f = makeFuture<string>(std::current_exception());
Definition at line 1347 of file Future-inl.h.
References folly::Future< T >::makeFuture.
Future< T > folly::makeFuture | ( | exception_wrapper | ew | ) |
Make a failed Future from an exception_wrapper. NOTE: This function is deprecated. Please use makeSemiFuture and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1352 of file Future-inl.h.
References folly::Future< T >::makeFuture, folly::gen::move, type, and value.
std::enable_if< std::is_base_of< std::exception, E >::value, Future< T > >::type folly::makeFuture | ( | E const & | e | ) |
Make a Future from an exception type E that can be passed to std::make_exception_ptr().
NOTE: This function is deprecated. Please use makeSemiFuture and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1359 of file Future-inl.h.
References folly::Future< T >::makeFuture.
NOTE: This function is deprecated. Please use makeSemiFuture and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1364 of file Future-inl.h.
References folly::futures::detail::Core< T >::make(), and folly::gen::move.
std::enable_if< !(isFuture<invoke_result_t<F>>::value), Future<typename lift_unit<invoke_result_t<F> >::type> >::type folly::makeFutureWith | ( | F && | func | ) |
Make a Future by executing a function.
If the function returns a value of type T, makeFutureWith returns a completed Future<T>, capturing the value returned by the function.
If the function returns a Future<T> already, makeFutureWith returns just that.
Either way, if the function throws, a failed Future is returned that captures the exception.
Calling makeFutureWith(func) is equivalent to calling makeFuture().then(func).
NOTE: This function is deprecated. Please use makeSemiFutureWith and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1322 of file Future-inl.h.
References makeTryWith(), type, and folly::futures::detail::FutureBase< T >::value().
Referenced by wangle::MockHandler< Rin, Rout, Win, Wout >::close(), folly::futures::map(), folly::futures::detail::retryingImpl(), TEST(), wangle::MockHandler< Rin, Rout, Win, Wout >::write(), and wangle::MockHandler< Rin, Rout, Win, Wout >::writeException().
std::enable_if< isFuture< invoke_result_t< F > >::value, invoke_result_t< F > >::type folly::makeFutureWith | ( | F && | func | ) |
Make a Future by executing a function.
If the function returns a value of type T, makeFutureWith returns a completed Future<T>, capturing the value returned by the function.
If the function returns a Future<T> already, makeFutureWith returns just that.
Either way, if the function throws, a failed Future is returned that captures the exception.
Calling makeFutureWith(func) is equivalent to calling makeFuture().then(func).
NOTE: This function is deprecated. Please use makeSemiFutureWith and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1322 of file Future-inl.h.
Referenced by wangle::MockHandler< Rin, Rout, Win, Wout >::close(), folly::futures::map(), folly::futures::detail::retryingImpl(), TEST(), wangle::MockHandler< Rin, Rout, Win, Wout >::write(), and wangle::MockHandler< Rin, Rout, Win, Wout >::writeException().
std::enable_if< !(isFuture<invoke_result_t<F>>::value), Future<lift_unit_t<invoke_result_t<F> > > >::type folly::makeFutureWith | ( | F && | func | ) |
Make a Future by executing a function.
If the function returns a value of type T, makeFutureWith returns a completed Future<T>, capturing the value returned by the function.
If the function returns a Future<T> already, makeFutureWith returns just that.
Either way, if the function throws, a failed Future is returned that captures the exception.
Calling makeFutureWith(func) is equivalent to calling makeFuture().then(func).
NOTE: This function is deprecated. Please use makeSemiFutureWith and pass the appropriate executor to .via on the returned SemiFuture to get a valid Future where necessary.
Definition at line 1340 of file Future-inl.h.
References makeTryWith(), type, and folly::futures::detail::FutureBase< T >::value().
|
noexcept |
ScopeGuard is a general implementation of the "Initialization is Resource Acquisition" idiom. Basically, it guarantees that a function is executed upon leaving the currrent scope unless otherwise told.
The makeGuard() function is used to create a new ScopeGuard object. It can be instantiated with a lambda function, a std::function<void()>, a functor, or a void(*)() function pointer.
Usage example: Add a friend to memory if and only if it is also added to the db.
void User::addFriend(User& newFriend) { // add the friend to memory friends_.push_back(&newFriend);
// If the db insertion that follows fails, we should // remove it from memory. auto guard = makeGuard([&] { friends_.pop_back(); });
// this will throw an exception upon error, which // makes the ScopeGuard execute UserCont::pop_back() // once the Guard's destructor is called. db_->addFriend(GetName(), newFriend.GetName());
// an exception was not thrown, so don't execute // the Guard. guard.dismiss(); }
Examine ScopeGuardTest.cpp for some more sample usage.
Stolen from: Andrei's and Petru Marginean's CUJ article: http://drdobbs.com/184403758 and the loki library: http://loki-lib.sourceforge.net/index.php?n=Idioms.ScopeGuardPointer and triendl.kj article: http://www.codeproject.com/KB/cpp/scope_guard.aspx
Definition at line 184 of file ScopeGuard.h.
References f, folly::gen::move, folly::pushmi::__adl::noexcept(), folly::detail::operator+(), type, and uncaught_exceptions().
Referenced by wangle::SSLContextManager::addSSLContextConfig(), folly::coro::detail::InlineTask< T >::Awaiter::await_resume(), BENCHMARK(), folly::AsyncUDPSocket::bind(), folly::python::bridgeFibers(), folly::python::bridgeFuture(), errnoStr(), wangle::SSLUtil::getSubjectAltName(), wangle::SSLContextManager::insert(), proxygen::HTTP1xCodec::onHeadersComplete(), folly::symbolizer::ElfFile::openNoThrow(), proxygen::HTTP2Codec::parseHeadersDecodeFrames(), folly::ThreadLocalPtr< SubscriberMap >::reset(), proxygen::HTTPSession::runLoopCallback(), folly::threadlocal_detail::ElementWrapper::set(), folly::Subprocess::spawn(), TEST(), TEST(), TEST_F(), testFinally(), testUndoAction(), folly::HHWheelTimer::timeoutExpired(), folly::IOBufQueue::updateGuard(), virtualExecutorTest(), and folly::HHWheelTimer::~HHWheelTimer().
MoveWrapper<T0> folly::makeMoveWrapper | ( | T && | t | ) |
Make a MoveWrapper from the argument. Because the name "makeMoveWrapper" is already quite transparent in its intent, this will work for lvalues as if you had wrapped them in std::move.
Definition at line 82 of file MoveWrapper.h.
References folly::pushmi::detail::t.
Referenced by TEST(), and TEST_F().
std::pair<Promise<T>, SemiFuture<T> > folly::makePromiseContract | ( | ) |
Definition at line 2033 of file Future.h.
References f, h, folly::futures::detail::FutureBase< T >::isReady(), folly::gen::move, and value().
SemiFuture< typename std::decay< T >::type > folly::makeSemiFuture | ( | T && | t | ) |
Make a completed SemiFuture by moving in a value. e.g.
string foo = "foo"; auto f = makeSemiFuture(std::move(foo));
or
auto f = makeSemiFuture<string>("foo");
Definition at line 712 of file Future-inl.h.
References folly::pushmi::detail::t, type, and folly::futures::detail::FutureBase< T >::value().
Referenced by makeSemiFuture(), folly::futures::map(), and TEST().
SemiFuture< T > folly::makeSemiFuture | ( | std::exception_ptr const & | e | ) |
Make a failed Future from an exception_ptr. Because the Future's type cannot be inferred you have to specify it, e.g.
auto f = makeSemiFuture<string>(std::current_exception());
Definition at line 747 of file Future-inl.h.
References makeSemiFuture().
SemiFuture< T > folly::makeSemiFuture | ( | exception_wrapper | ew | ) |
Make a failed SemiFuture from an exception_wrapper.
Definition at line 752 of file Future-inl.h.
References makeSemiFuture(), folly::gen::move, type, and value.
std::enable_if< std::is_base_of< std::exception, E >::value, SemiFuture< T > >::type folly::makeSemiFuture | ( | E const & | e | ) |
Make a SemiFuture from an exception type E that can be passed to std::make_exception_ptr().
Definition at line 759 of file Future-inl.h.
References makeSemiFuture().
SemiFuture< T > folly::makeSemiFuture | ( | Try< T > | t | ) |
Definition at line 764 of file Future-inl.h.
References folly::futures::detail::Core< T >::make(), and folly::gen::move.
|
inline |
Make a completed void SemiFuture.
Definition at line 770 of file Future-inl.h.
References makeSemiFuture().
std::enable_if< !(isFutureOrSemiFuture<invoke_result_t<F>>::value), SemiFuture<typename lift_unit<invoke_result_t<F> >::type> >::type folly::makeSemiFutureWith | ( | F && | func | ) |
Make a SemiFuture by executing a function.
If the function returns a value of type T, makeSemiFutureWith returns a completed SemiFuture<T>, capturing the value returned by the function.
If the function returns a SemiFuture<T> already, makeSemiFutureWith returns just that.
Either way, if the function throws, a failed Future is returned that captures the exception.
Definition at line 721 of file Future-inl.h.
References makeTryWith(), type, and folly::futures::detail::FutureBase< T >::value().
Referenced by folly::futures::map(), TEST(), and window().
std::enable_if< isFutureOrSemiFuture< invoke_result_t< F > >::value, SemiFuture< typename invoke_result_t< F >::value_type > >::type folly::makeSemiFutureWith | ( | F && | func | ) |
Make a SemiFuture by executing a function.
If the function returns a value of type T, makeSemiFutureWith returns a completed SemiFuture<T>, capturing the value returned by the function.
If the function returns a SemiFuture<T> already, makeSemiFutureWith returns just that.
Either way, if the function throws, a failed Future is returned that captures the exception.
Definition at line 721 of file Future-inl.h.
Referenced by folly::futures::map(), TEST(), and window().
std::enable_if< !(isFutureOrSemiFuture<invoke_result_t<F>>::value), SemiFuture<lift_unit_t<invoke_result_t<F> > > >::type folly::makeSemiFutureWith | ( | F && | func | ) |
Make a SemiFuture by executing a function.
If the function returns a value of type T, makeSemiFutureWith returns a completed SemiFuture<T>, capturing the value returned by the function.
If the function returns a SemiFuture<T> already, makeSemiFutureWith returns just that.
Either way, if the function throws, a failed Future is returned that captures the exception.
Definition at line 740 of file Future-inl.h.
References makeTryWith(), type, and folly::futures::detail::FutureBase< T >::value().
StampedPtr<T> folly::makeStampedPtr | ( | T * | ptr, |
uint16_t | stamp | ||
) |
Definition at line 124 of file StampedPtr.h.
References folly::StampedPtr< T >::pack().
Referenced by TEST().
|
inline |
Definition at line 55 of file Exception.h.
References testing::Args(), and makeSystemErrorExplicit().
Referenced by folly::test::TEST().
std::system_error folly::makeSystemError | ( | Args &&... | args | ) |
Definition at line 60 of file Exception.h.
References makeSystemErrorExplicit().
|
inline |
Definition at line 38 of file Exception.h.
References testing::Args().
Referenced by makeSystemError(), makeSystemErrorExplicit(), folly::test::TEST(), and throwSystemErrorExplicit().
std::system_error folly::makeSystemErrorExplicit | ( | int | err, |
Args &&... | args | ||
) |
Definition at line 50 of file Exception.h.
References makeSystemErrorExplicit().
std::enable_if< !std::is_same< invoke_result_t< F >, void >::value, Try< invoke_result_t< F > > >::type folly::makeTryWith | ( | F && | f | ) |
Definition at line 223 of file Try-inl.h.
References f, type, and folly::Try< T >::value().
Referenced by folly::fibers::TaskIterator< T >::addTask(), folly::fibers::FiberManager::addTaskRemoteFuture(), folly::python::bridgeFibers(), makeFutureWith(), makeSemiFutureWith(), folly::Future< T >::onTimeout(), folly::fibers::Promise< T, BatonT >::setWith(), folly::SharedPromise< T >::setWith(), folly::Promise< T >::setWith(), TEST(), folly::futures::detail::FutureBase< T >::thenImplementation(), and folly::futures::detail::CoreCallbackState< T, F >::tryInvoke().
std::enable_if< std::is_same< invoke_result_t< F >, void >::value, Try< void > >::type folly::makeTryWith | ( | F && | f | ) |
constexpr Unexpected< typename std::decay< Error >::type > folly::makeUnexpected | ( | Error && | err | ) |
For constructing an Unexpected object from an error code. Unexpected objects are implicitly convertible to Expected object in the error state. Usage is as follows:
enum class MyErrorCode { BAD_ERROR, WORSE_ERROR }; Expected<int, MyErrorCode> myAPI() { int i = // ...; return i ? makeExpected<MyErrorCode>(i) : makeUnexpected(MyErrorCode::BAD_ERROR); }
Definition at line 785 of file Expected.h.
Referenced by folly::detail::chronoRangeCheck(), folly::detail::convertTo(), proxygen::GzipHeaderCodec::decode(), folly::detail::digits_to(), folly::detail::durationToPosixTime(), folly::detail::SignedValueHandler< T, true >::finalize(), proxygen::TestStreamingCallback::getResult(), proxygen::compress::SimStreamingCallback::getResult(), isLowercase(), makeExpected(), folly::File::makeFile(), folly::detail::CheckTrailingSpace::operator()(), proxygen::GzipHeaderCodec::parseNameValues(), my::parseTo(), folly::detail::posixTimeToDuration(), folly::detail::str_to_bool(), folly::detail::str_to_floating(), folly::detail::str_to_integral(), TEST(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::then_(), toAppend(), folly::json_pointer::try_parse(), folly::json_patch::try_parse(), tryDecodeVarint(), folly::IPAddressV4::tryFromBinary(), folly::IPAddressV6::tryFromBinary(), folly::IPAddressV4::tryFromString(), folly::IPAddressV6::tryFromString(), folly::detail::tryPosixTimeToDuration(), folly::IPAddressV4::trySetFromBinary(), folly::IPAddressV6::trySetFromBinary(), and tryTo().
auto folly::makeUnpredictable | ( | T & | datum | ) | -> typename std::enable_if< !detail::DoNotOptimizeAwayNeedsIndirect<T>::value>::type |
Definition at line 285 of file Benchmark.h.
References benchmarkResultsFromDynamic(), benchmarkResultsToDynamic(), data(), printResultComparison(), T, and type.
Referenced by addBenchmark(), BENCHMARK(), and Run().
|
inline |
void folly::mallctlRead | ( | const char * | cmd, |
T * | out | ||
) |
Definition at line 48 of file MallctlHelper.h.
References folly::detail::mallctlHelper().
Referenced by folly::detail::MemoryIdler::flushLocalMallocCaches(), MallctlHelperTest::readArena0DecayTime(), and TEST_F().
Definition at line 58 of file MallctlHelper.h.
References folly::detail::mallctlHelper().
Referenced by TEST_F().
void folly::mallctlWrite | ( | const char * | cmd, |
T | in | ||
) |
Definition at line 53 of file MallctlHelper.h.
References folly::detail::mallctlHelper().
Referenced by MallctlHelperTest::TearDown(), and TEST_F().
OutputIt folly::merge | ( | InputIt1 | first1, |
InputIt1 | last1, | ||
InputIt2 | first2, | ||
InputIt2 | last2, | ||
OutputIt | d_first, | ||
Compare | comp | ||
) |
Definition at line 46 of file Merge.h.
References copy().
Referenced by TEST().
OutputIt folly::merge | ( | InputIt1 | first1, |
InputIt1 | last1, | ||
InputIt2 | first2, | ||
InputIt2 | last2, | ||
OutputIt | d_first | ||
) |
Definition at line 69 of file Merge.h.
References copy().
|
static |
Definition at line 246 of file Benchmark.cpp.
References humanReadable(), and kMetricSuffixes.
Referenced by printResultComparison().
void folly::mmapFileCopy | ( | const char * | src, |
const char * | dest, | ||
mode_t | mode = 0666 |
||
) |
Copy a file using mmap(). Overwrites dest.
Definition at line 411 of file MemoryMapping.cpp.
References alignedForwardMemcpy(), folly::Range< Iter >::data(), folly::MemoryMapping::hintLinearScan(), folly::MemoryMapping::range(), folly::Range< Iter >::size(), and folly::MemoryMapping::writable().
Definition at line 149 of file Bits.h.
References findLastSet(), T, and value.
Referenced by folly::AtomicUnorderedInsertMap< Key, Value, Hash, KeyEqual, SkipKeyValueDeletion, Atom, IndexType, Allocator >::AtomicUnorderedInsertMap(), BENCHMARK(), folly::ConcurrentHashMap< KeyType, ValueType, HashFn, KeyEqual, Allocator, ShardBits, Atom, Mutex >::ConcurrentHashMap(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::ConcurrentHashMapSegment(), and TEST().
int folly::openNoInt | ( | const char * | name, |
int | flags, | ||
mode_t | mode = 0666 |
||
) |
Convenience wrappers around some commonly used system calls. The *NoInt wrappers retry on EINTR. The *Full wrappers retry on EINTR and also loop until all data is written. Note that *Full wrappers weaken the thread semantics of underlying system calls.
Definition at line 36 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by wangle::FilePersistenceLayer< K, V >::persist(), readFile(), folly::test::CaptureFD::readIncremental(), testEmptyFile(), testInvalidFile(), testValidFile(), and TYPED_TEST().
constexpr bool folly::operator!= | ( | propagate_const< Pointer > const & | a, |
std::nullptr_t | |||
) |
Definition at line 219 of file PropagateConst.h.
References get_underlying().
constexpr bool folly::operator!= | ( | std::nullptr_t | , |
propagate_const< Pointer > const & | a | ||
) |
Definition at line 224 of file PropagateConst.h.
References get_underlying().
|
inline |
Definition at line 235 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::DestructorGuard::get().
constexpr bool folly::operator!= | ( | propagate_const< Pointer > const & | a, |
propagate_const< Pointer > const & | b | ||
) |
Definition at line 236 of file PropagateConst.h.
References get_underlying().
|
inline |
Definition at line 250 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::DestructorGuard::get().
|
inline |
Definition at line 255 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::DestructorGuard::get().
|
inline |
Definition at line 268 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::IntrusivePtr< AliasType >::get().
constexpr auto folly::operator!= | ( | propagate_const< Pointer > const & | a, |
Other const & | b | ||
) | -> decltype(get_underlying(a) != b, false) |
Definition at line 282 of file PropagateConst.h.
References a, b, and get_underlying().
|
inline |
Definition at line 286 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::IntrusivePtr< AliasType >::get().
|
inline |
Definition at line 292 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::IntrusivePtr< AliasType >::get().
constexpr auto folly::operator!= | ( | Other const & | a, |
propagate_const< Pointer > const & | b | ||
) | -> decltype(a != get_underlying(b), false) |
Definition at line 318 of file PropagateConst.h.
References b, and get_underlying().
|
inline |
|
inline |
Definition at line 425 of file ReadMostlySharedPtr.h.
|
inline |
Definition at line 432 of file ReadMostlySharedPtr.h.
|
inline |
Definition at line 439 of file ReadMostlySharedPtr.h.
|
inline |
Definition at line 446 of file ReadMostlySharedPtr.h.
constexpr bool folly::operator!= | ( | const Optional< U > & | a, |
const V & | b | ||
) |
constexpr bool folly::operator!= | ( | const U & | a, |
const Optional< V > & | b | ||
) |
constexpr bool folly::operator!= | ( | const Optional< U > & | a, |
const Optional< V > & | b | ||
) |
|
inline |
Definition at line 766 of file Expected.h.
References folly::detail::rhs.
Referenced by makeExpected(), and std::hash< TestStruct >::operator()().
bool folly::operator!= | ( | const Function< FunctionType > & | fn, |
std::nullptr_t | |||
) |
Definition at line 831 of file Function.h.
bool folly::operator!= | ( | std::nullptr_t | , |
const Function< FunctionType > & | fn | ||
) |
Definition at line 836 of file Function.h.
References testing::Args().
|
inline |
_t<std::enable_if<detail::ComparableAsStringPiece<T, U>::value, bool> > folly::operator!= | ( | const T & | lhs, |
const U & | rhs | ||
) |
|
inline |
Definition at line 1313 of file Expected.h.
|
delete |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
constexpr bool folly::operator!= | ( | const BasicFixedString< Char, A > & | a, |
const BasicFixedString< Char, B > & | b | ||
) |
|
inline |
Definition at line 89 of file AsyncTransport.h.
Referenced by folly::LogStreamProcessor::LogStreamProcessor().
|
inline |
Definition at line 97 of file AsyncTransport.h.
|
inline |
Definition at line 2447 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::append(), folly::gen::move, folly::basic_fbstring< E, T, A, Storage >::reserve(), and folly::basic_fbstring< E, T, A, Storage >::size().
Referenced by BENCHMARK(), and TEST().
|
inline |
|
inline |
Definition at line 2466 of file FBString.h.
References folly::fbstring_core< Char >::capacity(), folly::gen::move, folly::detail::rhs, folly::fbstring_core< Char >::size(), and folly::basic_fbstring< E, T, A, Storage >::size().
|
inline |
|
inline |
Definition at line 2488 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::append(), folly::basic_fbstring< E, T, A, Storage >::reserve(), and folly::basic_fbstring< E, T, A, Storage >::size().
|
inline |
Definition at line 2501 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::append(), folly::fbstring_core< Char >::capacity(), folly::gen::move, folly::basic_fbstring< E, T, A, Storage >::reserve(), and folly::fbstring_core< Char >::size().
|
inline |
|
inline |
Definition at line 2532 of file FBString.h.
References folly::fbstring_core< Char >::capacity(), folly::gen::move, folly::detail::rhs, and folly::fbstring_core< Char >::size().
|
inline |
Definition at line 2548 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::append(), folly::basic_fbstring< E, T, A, Storage >::reserve(), and folly::basic_fbstring< E, T, A, Storage >::size().
|
inline |
|
inline |
|
inline |
|
noexcept |
Symmetric concatenation
Definition at line 2971 of file FixedString.h.
References a, b, and folly::detail::fixedstring::Helper::data_().
Definition at line 122 of file LogLevel.h.
References logLevelToString(), name, operator<<(), string, stringToLogLevel(), and value().
|
inline |
bool folly::operator< | ( | Poly< I1 > const & | _this, |
Poly< I2 > const & | that | ||
) |
Definition at line 94 of file Regular.h.
References poly_empty(), and poly_type().
constexpr bool folly::operator< | ( | propagate_const< Pointer > const & | a, |
propagate_const< Pointer > const & | b | ||
) |
Definition at line 243 of file PropagateConst.h.
References get_underlying().
constexpr auto folly::operator< | ( | propagate_const< Pointer > const & | a, |
Other const & | b | ||
) | -> decltype(get_underlying(a) < b, false) |
Definition at line 288 of file PropagateConst.h.
References b, and get_underlying().
|
inline |
Definition at line 321 of file IPAddressV4.h.
References folly::IPAddressV4::toLongHBO().
constexpr auto folly::operator< | ( | Other const & | a, |
propagate_const< Pointer > const & | b | ||
) | -> decltype(a < get_underlying(b), false) |
Definition at line 324 of file PropagateConst.h.
References b, and get_underlying().
bool folly::operator< | ( | const IPAddress & | addr1, |
const IPAddress & | addr2 | ||
) |
Definition at line 405 of file IPAddress.cpp.
References folly::detail::familyNameStr(), folly::IPAddressV4::longestCommonPrefix(), folly::IPAddressV6::longestCommonPrefix(), prefix(), and sformat().
FOLLY_CPP14_CONSTEXPR bool folly::operator< | ( | const Optional< U > & | a, |
const Optional< V > & | b | ||
) |
Definition at line 512 of file Optional.h.
References folly::Optional< Value >::hasValue(), and folly::Optional< Value >::value().
|
delete |
|
delete |
Definition at line 567 of file Optional.h.
Definition at line 571 of file Optional.h.
|
inline |
_t<std::enable_if<detail::ComparableAsStringPiece<T, U>::value, bool> > folly::operator< | ( | const T & | lhs, |
const U & | rhs | ||
) |
|
inline |
Definition at line 1321 of file Expected.h.
References FOLLY_REQUIRES_TRAILING, folly::Expected< Value, Error >::hasError(), folly::expected_detail::ExpectedStorage< Value, Error >::uninitializedByException(), UNLIKELY, value, testing::Value(), and folly::expected_detail::ExpectedStorage< Value, Error >::value_.
Referenced by BENCHMARK(), folly::sorted_vector_set< folly::RequestData * >::operator>=(), folly::sorted_vector_map< Key, Value, Compare, Allocator, GrowthPolicy, Container >::operator>=(), TEST(), and testing::TEST().
|
delete |
|
delete |
|
inline |
Definition at line 2634 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare().
|
inline |
Definition at line 2641 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare().
|
inline |
Definition at line 2648 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare().
|
inline |
Definition at line 2848 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare(), and folly::basic_fbstring< E, T, A, Storage >::size().
|
inline |
Definition at line 2862 of file FBString.h.
|
noexcept |
Definition at line 2933 of file FixedString.h.
References a, b, folly::detail::fixedstring::compare_(), folly::detail::fixedstring::Helper::data_(), and lt.
std::ostream & folly::operator<< | ( | std::ostream & | os, |
const LogConfig & | config | ||
) |
Definition at line 27 of file ConfigHelpers.cpp.
References cc, folly::LogConfig::getCategoryConfigs(), folly::LogConfig::getHandlerConfigs(), and name.
std::ostream & folly::operator<< | ( | ostream & | os, |
const IPAddressV4 & | addr | ||
) |
std::ostream& folly::operator<< | ( | std::ostream & | os, |
E | e | ||
) |
Definition at line 37 of file ExpectedTest.cpp.
ostream& folly::operator<< | ( | ostream & | os, |
const IPAddress & | addr | ||
) |
Definition at line 37 of file IPAddress.cpp.
std::ostream& folly::operator<< | ( | std::ostream & | os, |
const Expected< V, E > & | e | ||
) |
Definition at line 49 of file ExpectedTest.cpp.
std::ostream & folly::operator<< | ( | ostream & | os, |
const IPAddressV6 & | addr | ||
) |
std::ostream & folly::operator<< | ( | std::ostream & | os, |
const LogCategoryConfig & | config | ||
) |
Definition at line 60 of file ConfigHelpers.cpp.
References folly::LogCategoryConfig::handlers, folly::Optional< Value >::hasValue(), folly::LogCategoryConfig::inheritParentLevel, join(), folly::LogCategoryConfig::level, logLevelToString(), and folly::Optional< Value >::value().
std::ostream & folly::operator<< | ( | std::ostream & | os, |
const LogHandlerConfig & | config | ||
) |
Definition at line 73 of file ConfigHelpers.cpp.
References folly::gen::first, folly::LogHandlerConfig::options, folly::LogHandlerConfig::type, and folly::Optional< Value >::value().
|
inline |
std::ostream & folly::operator<< | ( | std::ostream & | os, |
LogLevel | level | ||
) |
Print a LogLevel in a human readable format.
Definition at line 141 of file LogLevel.cpp.
References logLevelToString().
std::ostream & folly::operator<< | ( | std::ostream & | os, |
MacAddress | address | ||
) |
Definition at line 147 of file MacAddress.cpp.
References folly::MacAddress::toString().
std::ostream& folly::operator<< | ( | std::ostream & | os, |
const PackedSyncPtr< T > & | ptr | ||
) |
std::ostream & folly::operator<< | ( | std::ostream & | os, |
const TimePoint & | timePoint | ||
) |
Definition at line 234 of file TimeUtil.cpp.
References folly::TimePoint::getTimeEnd(), folly::TimePoint::getTimeStart(), and folly::TimePoint::getTimeWaiting().
std::ostream& folly::operator<< | ( | std::ostream & | out, |
const Formatter< containerMode, Args... > & | formatter | ||
) |
std::ostream & folly::operator<< | ( | std::ostream & | os, |
const AsyncIOOp & | op | ||
) |
Definition at line 388 of file AsyncIO.cpp.
References folly::AsyncIOOp::COMPLETED, errnoStr(), folly::AsyncIOOp::iocb_, folly::AsyncIOOp::result_, folly::AsyncIOOp::state_, and folly::AsyncIOOp::UNINITIALIZED.
std::ostream & folly::operator<< | ( | std::ostream & | os, |
AsyncIOOp::State | state | ||
) |
Definition at line 406 of file AsyncIO.cpp.
|
inline |
std::ostream & folly::operator<< | ( | std::ostream & | os, |
const PasswordCollector & | collector | ||
) |
Definition at line 620 of file SSLContext.cpp.
References folly::PasswordCollector::describe().
std::basic_ostream<Ch>& folly::operator<< | ( | std::basic_ostream< Ch > & | sout, |
exception_wrapper const & | ew | ||
) |
Inserts ew.what()
into the ostream sout
.
sout
Definition at line 635 of file ExceptionWrapper.h.
References folly::exception_wrapper::what().
std::ostream & folly::operator<< | ( | std::ostream & | os, |
const SocketAddress & | addr | ||
) |
|
inline |
Definition at line 1158 of file dynamic-inl.h.
References folly::dynamic::print().
Referenced by folly::IPAddressV4::AddressStorage::AddressStorage(), operator-=(), and toAppend().
std::basic_ostream<C>& folly::operator<< | ( | std::basic_ostream< C > & | os, |
Range< C const * > | piece | ||
) |
Definition at line 1167 of file Range.h.
References folly::Range< Iter >::size(), and folly::Range< Iter >::start().
|
inline |
Definition at line 2772 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::data(), failed, and folly::basic_fbstring< E, T, A, Storage >::size().
std::ostream& folly::operator<< | ( | std::ostream & | os, |
const AsyncSocket::StateEnum & | state | ||
) |
Definition at line 2807 of file AsyncSocket.cpp.
constexpr bool folly::operator<= | ( | propagate_const< Pointer > const & | a, |
propagate_const< Pointer > const & | b | ||
) |
Definition at line 250 of file PropagateConst.h.
References get_underlying().
constexpr auto folly::operator<= | ( | propagate_const< Pointer > const & | a, |
Other const & | b | ||
) | -> decltype(get_underlying(a) <= b, false) |
Definition at line 294 of file PropagateConst.h.
References b, and get_underlying().
constexpr auto folly::operator<= | ( | Other const & | a, |
propagate_const< Pointer > const & | b | ||
) | -> decltype(a <= get_underlying(b), false) |
Definition at line 330 of file PropagateConst.h.
References b, and get_underlying().
|
inline |
constexpr bool folly::operator<= | ( | const Optional< U > & | a, |
const Optional< V > & | b | ||
) |
Definition at line 530 of file Optional.h.
|
delete |
|
delete |
Definition at line 583 of file Optional.h.
Definition at line 587 of file Optional.h.
|
inline |
_t<std::enable_if<detail::ComparableAsStringPiece<T, U>::value, bool> > folly::operator<= | ( | const T & | lhs, |
const U & | rhs | ||
) |
|
inline |
Definition at line 1340 of file Expected.h.
References FOLLY_REQUIRES_TRAILING, value, and testing::Value().
Referenced by testing::TEST().
|
delete |
|
delete |
|
inline |
Definition at line 2676 of file FBString.h.
|
inline |
Definition at line 2683 of file FBString.h.
|
inline |
Definition at line 2690 of file FBString.h.
|
inline |
|
inline |
|
noexcept |
Definition at line 2954 of file FixedString.h.
|
inline |
bool folly::operator== | ( | Poly< I1 > const & | _this, |
Poly< I2 > const & | that | ||
) |
Definition at line 71 of file Regular.h.
References poly_empty(), and poly_type().
bool folly::operator== | ( | const MoveTester & | o1, |
const MoveTester & | o2 | ||
) |
Definition at line 153 of file ExpectedTest.cpp.
References folly::MoveTester::s_.
constexpr bool folly::operator== | ( | propagate_const< Pointer > const & | a, |
std::nullptr_t | |||
) |
Definition at line 209 of file PropagateConst.h.
References get_underlying().
constexpr bool folly::operator== | ( | std::nullptr_t | , |
propagate_const< Pointer > const & | a | ||
) |
Definition at line 214 of file PropagateConst.h.
References get_underlying().
constexpr bool folly::operator== | ( | propagate_const< Pointer > const & | a, |
propagate_const< Pointer > const & | b | ||
) |
Definition at line 229 of file PropagateConst.h.
References get_underlying().
|
inline |
Definition at line 230 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::DestructorGuard::get().
|
inline |
Definition at line 240 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::DestructorGuard::get().
|
inline |
Definition at line 245 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::DestructorGuard::get().
|
inline |
Definition at line 262 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::IntrusivePtr< AliasType >::get().
|
inline |
Definition at line 274 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::IntrusivePtr< AliasType >::get().
constexpr auto folly::operator== | ( | propagate_const< Pointer > const & | a, |
Other const & | b | ||
) | -> decltype(get_underlying(a) == b, false) |
Definition at line 276 of file PropagateConst.h.
References a, b, and get_underlying().
|
inline |
Definition at line 280 of file DelayedDestructionBase.h.
References folly::DelayedDestructionBase::IntrusivePtr< AliasType >::get().
constexpr auto folly::operator== | ( | Other const & | a, |
propagate_const< Pointer > const & | b | ||
) | -> decltype(a == get_underlying(b), false) |
Definition at line 312 of file PropagateConst.h.
References b, and get_underlying().
|
inline |
Return true if two addresses are equal.
Definition at line 317 of file IPAddressV4.h.
References folly::IPAddressV4::toLong().
bool folly::operator== | ( | const IPAddress & | addr1, |
const IPAddress & | addr2 | ||
) |
Definition at line 375 of file IPAddress.cpp.
|
inline |
Definition at line 397 of file ReadMostlySharedPtr.h.
References folly::ReadMostlyMainPtr< T, RefCount >::get().
|
inline |
Definition at line 404 of file ReadMostlySharedPtr.h.
References folly::ReadMostlyMainPtr< T, RefCount >::get().
|
inline |
Definition at line 411 of file ReadMostlySharedPtr.h.
References folly::ReadMostlySharedPtr< T, RefCount >::get().
|
inline |
Definition at line 418 of file ReadMostlySharedPtr.h.
References folly::ReadMostlySharedPtr< T, RefCount >::get().
constexpr bool folly::operator== | ( | const Optional< U > & | a, |
const V & | b | ||
) |
Definition at line 474 of file Optional.h.
References b, folly::Optional< Value >::hasValue(), and folly::Optional< Value >::value().
constexpr bool folly::operator== | ( | const U & | a, |
const Optional< V > & | b | ||
) |
Definition at line 484 of file Optional.h.
References a, folly::Optional< Value >::hasValue(), and folly::Optional< Value >::value().
FOLLY_CPP14_CONSTEXPR bool folly::operator== | ( | const Optional< U > & | a, |
const Optional< V > & | b | ||
) |
Definition at line 494 of file Optional.h.
References folly::Optional< Value >::hasValue(), and folly::Optional< Value >::value().
Definition at line 559 of file Optional.h.
References folly::Optional< Value >::hasValue().
Definition at line 563 of file Optional.h.
|
inline |
Definition at line 758 of file Expected.h.
References folly::Unexpected< Error >::error(), FOLLY_REQUIRES_TRAILING, and value.
Referenced by makeExpected(), folly::sorted_vector_set< folly::RequestData * >::operator!=(), folly::sorted_vector_map< Key, Value, Compare, Allocator, GrowthPolicy, Container >::operator!=(), std::hash< TestStruct >::operator()(), folly::MoveTester::operator=(), folly::Expected< int, E >::swap(), TEST(), and TEST().
bool folly::operator== | ( | const Function< FunctionType > & | fn, |
std::nullptr_t | |||
) |
Definition at line 821 of file Function.h.
bool folly::operator== | ( | std::nullptr_t | , |
const Function< FunctionType > & | fn | ||
) |
Definition at line 826 of file Function.h.
|
inline |
Templated comparison operators
Definition at line 1187 of file Range.h.
References folly::Range< Iter >::compare(), and folly::Range< Iter >::size().
_t<std::enable_if<detail::ComparableAsStringPiece<T, U>::value, bool> > folly::operator== | ( | const T & | lhs, |
const U & | rhs | ||
) |
bool folly::operator== | ( | MutableStringPiece | mp, |
StringPiece | sp | ||
) |
bool folly::operator== | ( | StringPiece | sp, |
MutableStringPiece | mp | ||
) |
|
inline |
Definition at line 1295 of file Expected.h.
References FOLLY_REQUIRES_TRAILING, folly::Expected< Value, Error >::hasError(), folly::expected_detail::ExpectedStorage< Value, Error >::uninitializedByException(), UNLIKELY, value, testing::Value(), folly::expected_detail::ExpectedStorage< Value, Error >::value_, and folly::expected_detail::ExpectedStorage< Value, Error >::which_.
|
delete |
|
delete |
|
inline |
Definition at line 2592 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare(), and folly::basic_fbstring< E, T, A, Storage >::size().
|
inline |
Definition at line 2599 of file FBString.h.
|
inline |
Definition at line 2606 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare().
|
inline |
Definition at line 2820 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare(), and folly::basic_fbstring< E, T, A, Storage >::size().
|
inline |
Definition at line 2827 of file FBString.h.
|
noexcept |
Symmetric relational operators
Definition at line 2915 of file FixedString.h.
References a, b, folly::detail::fixedstring::Helper::data_(), and folly::detail::fixedstring::equal_().
constexpr bool folly::operator> | ( | propagate_const< Pointer > const & | a, |
propagate_const< Pointer > const & | b | ||
) |
Definition at line 257 of file PropagateConst.h.
References get_underlying().
constexpr auto folly::operator> | ( | propagate_const< Pointer > const & | a, |
Other const & | b | ||
) | -> decltype(get_underlying(a) > b, false) |
Definition at line 300 of file PropagateConst.h.
References b, and get_underlying().
|
inline |
constexpr auto folly::operator> | ( | Other const & | a, |
propagate_const< Pointer > const & | b | ||
) | -> decltype(a > get_underlying(b), false) |
Definition at line 336 of file PropagateConst.h.
References b, and get_underlying().
constexpr bool folly::operator> | ( | const Optional< U > & | a, |
const Optional< V > & | b | ||
) |
|
delete |
|
delete |
Definition at line 575 of file Optional.h.
References folly::Optional< Value >::hasValue().
Definition at line 579 of file Optional.h.
|
inline |
_t<std::enable_if<detail::ComparableAsStringPiece<T, U>::value, bool> > folly::operator> | ( | const T & | lhs, |
const U & | rhs | ||
) |
|
inline |
Definition at line 1349 of file Expected.h.
References FOLLY_REQUIRES_TRAILING, value, and testing::Value().
Referenced by makeExpected(), folly::sorted_vector_set< folly::RequestData * >::operator<=(), folly::sorted_vector_map< Key, Value, Compare, Allocator, GrowthPolicy, Container >::operator<=(), operator>=(), and testing::TEST().
|
delete |
|
delete |
|
inline |
Definition at line 2655 of file FBString.h.
|
inline |
Definition at line 2662 of file FBString.h.
|
inline |
Definition at line 2669 of file FBString.h.
|
inline |
Definition at line 2855 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::compare(), and folly::basic_fbstring< E, T, A, Storage >::size().
|
inline |
Definition at line 2869 of file FBString.h.
|
noexcept |
Definition at line 2947 of file FixedString.h.
constexpr bool folly::operator>= | ( | propagate_const< Pointer > const & | a, |
propagate_const< Pointer > const & | b | ||
) |
Definition at line 264 of file PropagateConst.h.
References get_underlying().
constexpr auto folly::operator>= | ( | propagate_const< Pointer > const & | a, |
Other const & | b | ||
) | -> decltype(get_underlying(a) >= b, false) |
Definition at line 306 of file PropagateConst.h.
References b, and get_underlying().
|
inline |
constexpr auto folly::operator>= | ( | Other const & | a, |
propagate_const< Pointer > const & | b | ||
) | -> decltype(a >= get_underlying(b), false) |
Definition at line 342 of file PropagateConst.h.
References b, and get_underlying().
constexpr bool folly::operator>= | ( | const Optional< U > & | a, |
const Optional< V > & | b | ||
) |
|
delete |
|
delete |
Definition at line 591 of file Optional.h.
Definition at line 595 of file Optional.h.
References FOLLY_NAMESPACE_STD_BEGIN.
|
inline |
_t<std::enable_if<detail::ComparableAsStringPiece<T, U>::value, bool> > folly::operator>= | ( | const T & | lhs, |
const U & | rhs | ||
) |
|
inline |
Definition at line 1358 of file Expected.h.
References folly::detail::rhs.
Referenced by makeExpected(), operator>=(), and testing::TEST().
|
delete |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
noexcept |
Definition at line 2961 of file FixedString.h.
|
inline |
Definition at line 2728 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::erase(), folly::basic_fbstring< E, T, A, Storage >::max_size(), and folly::basic_fbstring< E, T, A, Storage >::push_back().
|
inline |
Definition at line 73 of file AsyncTransport.h.
|
inline |
Definition at line 81 of file AsyncTransport.h.
|
inline |
Definition at line 105 of file AsyncTransport.h.
decltype(auto) folly::overload | ( | Cases &&... | cases | ) |
Definition at line 62 of file Overload.h.
Referenced by folly::test::TEST(), TEST(), and variant_match().
dynamic folly::parseJson | ( | StringPiece | range | ) |
Definition at line 900 of file json.cpp.
Referenced by BENCHMARK(), compareJson(), compareJsonWithTolerance(), proxygen::HTTPArchive::fromFile(), proxygen::HTTPArchive::fromPublicFile(), wangle::FilePersistenceLayer< K, V >::load(), main(), parseLogConfigJson(), wangle::TLSCredProcessor::processTLSTickets(), resultsFromFile(), TEST(), and TEST_F().
dynamic folly::parseJson | ( | StringPiece | range, |
json::serialization_opts const & | opts | ||
) |
|
static |
Returns the first decimal number in the string, or throws an exception if the string does not start with a number terminated by ',', '-', '
', or eos.
Definition at line 85 of file CacheLocality.cpp.
References folly::test::end(), i, min, folly::gen::move, folly::CacheLocality::numCachesByLevel, folly::detail::rhs, sformat(), string, and val.
LogConfig folly::parseLogConfig | ( | StringPiece | value | ) |
Parse a log configuration string.
See the documentation in logging/docs/Config.md for a description of the configuration string syntax.
Throws a LogConfigParseError on error.
Definition at line 446 of file LogConfigParser.cpp.
References FOLLY_SAFE_DCHECK, folly::gen::move, parseLogConfigJson(), split(), folly::Range< Iter >::startsWith(), and trimWhitespace().
Referenced by initLogging(), and TEST().
Parse a folly::dynamic object.
The input should be an object data type, and is parsed the same as a JSON object accpted by parseLogConfigJson().
Definition at line 484 of file LogConfigParser.cpp.
References folly::LogName::canonicalize(), folly::dynamic::get_ptr(), folly::dynamic::isObject(), and folly::gen::move.
Referenced by parseLogConfigJson().
LogConfig folly::parseLogConfigJson | ( | StringPiece | value | ) |
Parse a JSON configuration string.
See the documentation in logging/docs/Config.md for a description of the JSON configuration object format.
This function uses relaxed JSON parsing, allowing C and C++ style comments, as well as trailing commas.
Definition at line 477 of file LogConfigParser.cpp.
References folly::json::serialization_opts::allow_trailing_comma, parseJson(), parseLogConfigDynamic(), and folly::json::stripComments().
Referenced by parseLogConfig(), and TEST().
NestedCommandLineParseResult folly::parseNestedCommandLine | ( | int | argc, |
const char *const | argv[], | ||
const boost::program_options::options_description & | desc | ||
) |
NestedCommandLineParseResult folly::parseNestedCommandLine | ( | const std::vector< std::string > & | cmdline, |
const boost::program_options::options_description & | desc | ||
) |
NestedCommandLineParseResult folly::parseNestedCommandLine | ( | int | argc, |
const char *const | argv[], | ||
const po::options_description & | desc | ||
) |
Definition at line 342 of file ProgramOptions.cpp.
Referenced by folly::NestedCommandLineApp::doRun(), and main().
NestedCommandLineParseResult folly::parseNestedCommandLine | ( | const std::vector< std::string > & | cmdline, |
const po::options_description & | desc | ||
) |
Definition at line 349 of file ProgramOptions.cpp.
|
inline |
|
noexcept |
Definition at line 1386 of file Conv.h.
References FOLLY_NODISCARD, parseTo(), T, and type.
|
inlinenoexcept |
Definition at line 1394 of file Conv.h.
References folly::Range< Iter >::end(), and FOLLY_NODISCARD.
|
inline |
Definition at line 1402 of file Conv.h.
References folly::Range< Iter >::data(), folly::Range< Iter >::end(), FOLLY_NODISCARD, and folly::Range< Iter >::size().
|
inline |
Definition at line 1411 of file Conv.h.
References folly::basic_fbstring< E, T, A, Storage >::append(), folly::basic_fbstring< E, T, A, Storage >::clear(), folly::Range< Iter >::data(), folly::Range< Iter >::end(), and folly::Range< Iter >::size().
auto folly::partial | ( | F && | f, |
Args &&... | args | ||
) | -> detail::partial::Partial< typename std::decay<F>::type, std::tuple<typename std::decay<Args>::type...>> |
Partially applies arguments to a callable
partial
takes a callable and zero or more additional arguments and returns a callable object, which when called with zero or more arguments, will invoke the original callable with the additional arguments passed to partial
, followed by those passed to the call.
E.g. partial(Foo, 1, 2)(3)
is equivalent to Foo(1, 2, 3)
.
partial
can be used to bind a class method to an instance: partial(&Foo::method, foo_pointer)
returns a callable object that can be invoked in the same way as foo_pointer->method
. In case the first argument in a call to partial
is a member pointer, the second argument can be a reference, pointer or any object that can be dereferenced to an object of type Foo (like std::shared_ptr
or std::unique_ptr
).
partial
is similar to std::bind
, but you don't have to use placeholders to have arguments passed on. Any number of arguments passed to the object returned by partial
when called will be added to those passed to partial
and passed to the original callable.
Definition at line 119 of file Partial.h.
References f.
Referenced by proxygen::QPACKDecoder::decodeLiteralHeaderQ(), folly::f14::operator<<(), TEST(), and TEST_P().
|
inline |
Read l bytes into the low bits of a value of an unsigned integral type T, where l < sizeof(T).
This is intended as a complement to loadUnaligned to read the tail of a buffer when it is processed one word at a time.
Definition at line 318 of file Bits.h.
References assume(), kHasUnalignedAccess, kIsLittleEndian, T, value, and value().
auto folly::poly_call | ( | This && | _this, |
As &&... | as | ||
) | -> decltype(detail::PolyAccess::call<N>( static_cast<This&&>(_this), static_cast<As&&>(as)...)) |
Call the N-th member of the currently-being-defined interface. When the first parameter is an object of type PolySelf<Base>
(as opposed to *this
) you must explicitly specify which interface through which to dispatch. For instance:
struct IAddable { template <class Base> struct Interface : Base { friend PolySelf<Base, Decay> operator+(PolySelf<Base> const& a, PolySelf<Base> const& b) { return folly::poly_call<0, IAddable>(a, b); } }; template <class T> static auto plus_(T const& a, T const& b) -> decltype(a + b) { return a + b; } template <class T> using Members = FOLLY_POLY_MEMBERS(&plus_<std::decay_t<T>>); };
Definition at line 236 of file Poly.h.
References folly::gen::as().
Referenced by poly_call().
decltype(auto) folly::poly_call | ( | detail::PolyNode< I, Tail > && | _this, |
As &&... | as | ||
) |
decltype(auto) folly::poly_call | ( | detail::PolyNode< I, Tail > & | _this, |
As &&... | as | ||
) |
decltype(auto) folly::poly_call | ( | detail::PolyNode< I, Tail > const & | _this, |
As &&... | as | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 262 of file Poly.h.
References upload::const, and value.
auto folly::poly_call | ( | Poly && | _this, |
As &&... | as | ||
) | -> decltype(poly_call<N, I>( static_cast<Poly&&>(_this).get(), static_cast<As&&>(as)...)) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 275 of file Poly.h.
References folly::gen::as(), assume_unreachable(), and poly_call().
detail::AddCvrefOf< T, I > & folly::poly_cast | ( | detail::PolyRoot< I > & | that | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 310 of file Poly.h.
Referenced by poly_cast().
detail::AddCvrefOf< T, I > const & folly::poly_cast | ( | detail::PolyRoot< I > const & | that | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 316 of file Poly.h.
References assume_unreachable(), poly_cast(), and T.
detail::AddCvrefOf<T, I>&& folly::poly_cast | ( | detail::PolyRoot< I > && | that | ) |
Try to cast the Poly
object to the requested type. If the Poly
stores an object of that type, return a reference to the object; otherwise, throw an exception.
T | The (unqualified) type to which to cast the Poly object. |
Poly | The type of the Poly object. |
that | The Poly object to be cast. |
T
object stored in or refered to by that
. BadPolyAccess | if that is empty. |
BadPolyCast | if that does not store or refer to an object of type T . |
Definition at line 304 of file Poly.h.
References folly::gen::move.
constexpr auto folly::poly_cast | ( | Poly && | that | ) | -> decltype(poly_cast<T>(std::declval<Poly>().get())) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 346 of file Poly.h.
References poly_cast(), and T.
|
noexcept |
Returns true
if that
is not currently storing an object; false
, otherwise.
Definition at line 383 of file Poly.h.
Referenced by folly::poly::IBooleanTestable::Interface< Base >::operator!(), operator<(), operator==(), poly_empty(), and TEST().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 407 of file Poly.h.
References assume_unreachable(), folly::pushmi::__adl::noexcept(), poly_empty(), and value().
|
noexcept |
|
noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 434 of file Poly.h.
References folly::gen::move.
|
noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 440 of file Poly.h.
References assume_unreachable(), folly::gen::move, folly::pushmi::__adl::noexcept(), poly_move(), and value.
|
noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 454 of file Poly.h.
References data, folly::pushmi::__adl::noexcept(), poly_move(), swap(), folly::pushmi::detail::t, T, and value.
|
noexcept |
Returns a reference to the std::type_info
object corresponding to the object currently stored in that
. If that
is empty, returns typeid(void)
.
Definition at line 358 of file Poly.h.
References assume_unreachable(), folly::pushmi::__adl::noexcept(), type, and value.
Referenced by operator<(), operator==(), poly_type(), and TEST().
|
noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 372 of file Poly.h.
References poly_type().
|
inline |
popcount
Returns the number of bits which are set.
Definition at line 130 of file Bits.h.
References folly::detail::bits_to_unsigned(), T, and value.
Referenced by folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::ConcurrentHashMapSegment(), folly::Bits< T, Traits >::count(), select64(), folly::compression::BitVectorReader< Encoder, Instructions, kUnchecked >::skip(), folly::compression::detail::UpperBitsReader< Encoder, Instructions, SizeType >::skip(), folly::compression::BitVectorReader< Encoder, Instructions, kUnchecked >::skipTo(), folly::compression::detail::UpperBitsReader< Encoder, Instructions, SizeType >::skipToNext(), TEST(), and TEST_F().
FOLLY_NODISCARD ssize_t folly::preadFull | ( | int | fd, |
void * | buf, | ||
size_t | count, | ||
off_t | offset | ||
) |
Definition at line 130 of file FileUtil.cpp.
References folly::fileutil_detail::wrapFull().
Referenced by folly::test::CaptureFD::readIncremental(), and shutdownNoInt().
ssize_t folly::preadNoInt | ( | int | fd, |
void * | buf, | ||
size_t | count, | ||
off_t | offset | ||
) |
Definition at line 106 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by shutdownNoInt().
FOLLY_NODISCARD ssize_t folly::preadvFull | ( | int | fd, |
iovec * | iov, | ||
int | count, | ||
off_t | offset | ||
) |
Definition at line 146 of file FileUtil.cpp.
References preadv(), and folly::fileutil_detail::wrapvFull().
Referenced by shutdownNoInt().
std::string folly::prettyPrint | ( | double | val, |
PrettyType | type, | ||
bool | addSpace | ||
) |
Definition at line 386 of file String.cpp.
References i, PRETTY_NUM_TYPES, string, suffix, and type.
Referenced by folly::GoogleLogger< Style >::operator()(), and TEST().
double folly::prettyToDouble | ( | folly::StringPiece *const | prettyString, |
const PrettyType | type | ||
) |
This utility converts StringPiece in pretty format (look above) to double, with progress information. Alters the StringPiece parameter to get rid of the already-parsed characters. Expects string in form <floating point="" number>=""> {space}* [<suffix>] If string is not in correct format, utility finds longest valid prefix and if there at least one, returns double value based on that prefix and modifies string to what is left after parsing. Throws and std::range_error exception if there is no correct parse. Examples(for PRETTY_UNITS_METRIC): '10M' => 10 000 000 '10 M' => 10 000 000 '10' => 10 '10 Mx' => 10 000 000, prettyString == "x" 'abc' => throws std::range_error
Definition at line 416 of file String.cpp.
References folly::Range< Iter >::advance(), folly::Range< Iter >::front(), folly::Range< Iter >::size(), folly::Range< Iter >::startsWith(), suffix, type, and value().
Referenced by prettyToDouble(), and TEST().
double folly::prettyToDouble | ( | folly::StringPiece | prettyString, |
const PrettyType | type | ||
) |
Same as prettyToDouble(folly::StringPiece*, PrettyType), but expects whole string to be correctly parseable. Throws std::range_error otherwise
Definition at line 451 of file String.cpp.
References folly::detail::enforceWhitespace(), and prettyToDouble().
Definition at line 155 of file Bits.h.
References findLastSet(), T, and value.
Referenced by TEST().
|
static |
Definition at line 336 of file Benchmark.cpp.
References printBenchmarkResultsAsJson(), and printBenchmarkResultsAsVerboseJson().
Referenced by runBenchmarks().
|
static |
Definition at line 319 of file Benchmark.cpp.
References object, and toPrettyJson().
Referenced by printBenchmarkResults().
|
static |
Definition at line 329 of file Benchmark.cpp.
References benchmarkResultsToDynamic(), and toPrettyJson().
Referenced by printBenchmarkResults().
void folly::printResultComparison | ( | const vector< detail::BenchmarkResult > & | base, |
const vector< detail::BenchmarkResult > & | test | ||
) |
Definition at line 371 of file Benchmark.cpp.
References columns, get_optional(), lastFile, max, metricReadable(), readableTime(), resultKey(), and s.
Referenced by compareBenchmarkResults(), and makeUnpredictable().
void folly::PrintTo | ( | const std::shared_ptr< LogHandler > & | handler, |
std::ostream * | os | ||
) |
Definition at line 90 of file ConfigHelpers.cpp.
|
inline |
Definition at line 272 of file TestUtils.h.
References testing::PrintToString(), and folly::Range< Iter >::str().
void folly::PrintTo | ( | const dynamic & | dyn, |
std::ostream * | os | ||
) |
Definition at line 937 of file json.cpp.
References folly::json::serialization_opts::allow_nan_inf, folly::json::serialization_opts::allow_non_string_keys, folly::json::serialization_opts::pretty_formatting, folly::json::serialize(), and folly::json::serialization_opts::sort_keys.
Referenced by TEST().
ssize_t folly::pwriteFull | ( | int | fd, |
const void * | buf, | ||
size_t | count, | ||
off_t | offset | ||
) |
Definition at line 138 of file FileUtil.cpp.
References folly::fileutil_detail::wrapFull().
Referenced by shutdownNoInt(), and folly::RecordIOWriter::write().
ssize_t folly::pwriteNoInt | ( | int | fd, |
const void * | buf, | ||
size_t | count, | ||
off_t | offset | ||
) |
Definition at line 118 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by shutdownNoInt().
ssize_t folly::pwritevFull | ( | int | fd, |
iovec * | iov, | ||
int | count, | ||
off_t | offset | ||
) |
Definition at line 154 of file FileUtil.cpp.
References pwritev(), and folly::fileutil_detail::wrapvFull().
Referenced by shutdownNoInt(), and folly::RecordIOWriter::write().
|
inline |
Finds the first occurrence of needle in haystack. The algorithm is on average faster than O(haystack.size() * needle.size()) but not as fast as Boyer-Moore. On the upside, it does not do any upfront preprocessing and does not allocate memory.
Finds substrings faster than brute force by borrowing from Boyer-Moore
Definition at line 1292 of file Range.h.
References folly::Range< Iter >::begin(), folly::Range< Iter >::end(), i, folly::Range< Iter >::size(), and folly::gen::skip().
Referenced by TEST().
size_t folly::qfind | ( | const Range< Iter > & | haystack, |
const typename Range< Iter >::value_type & | needle | ||
) |
Finds the first occurrence of needle in haystack. The result is the offset reported to the beginning of haystack, or string::npos if needle wasn't found.
Definition at line 1396 of file Range.h.
References folly::Range< Iter >::begin(), folly::Range< Iter >::data(), folly::Range< Iter >::end(), and needle.
|
inline |
Definition at line 1417 of file Range.h.
References folly::Range< Iter >::data(), folly::Range< Iter >::empty(), needle, and folly::Range< Iter >::size().
|
inline |
Definition at line 1440 of file Range.h.
References folly::Range< Iter >::data(), folly::Range< Iter >::empty(), needle, and folly::Range< Iter >::size().
Referenced by folly::Range< unsigned char * >::find().
|
inline |
Finds the first occurrence of any element of needle in haystack. The algorithm is O(haystack.size() * needle.size()).
Definition at line 1466 of file Range.h.
References qfind_first_of().
size_t folly::qfind_first_of | ( | const Range< Iter > & | haystack, |
const Range< Iter > & | needles, | ||
Comp | eq | ||
) |
Definition at line 1361 of file Range.h.
References folly::Range< Iter >::begin(), and folly::Range< Iter >::end().
|
inline |
Definition at line 1472 of file Range.h.
References folly::detail::qfind_first_byte_of().
|
inline |
Definition at line 1480 of file Range.h.
References folly::detail::qfind_first_byte_of().
Referenced by folly::Range< unsigned char * >::find_first_of(), and qfind_first_of().
|
inline |
Definition at line 367 of file Random.h.
References folly::Random::rand32().
Referenced by folly::sync_tests::getRNG(), folly::io::test::RandomDataHolder::RandomDataHolder(), TEST(), and TEST_F().
constexpr Range<Iter> folly::range | ( | Iter | first, |
Iter | last | ||
) |
Create a range from two iterators, with type deduction.
Definition at line 1114 of file Range.h.
References folly::gen::first.
Referenced by folly::RecordIOReader::Iterator::advanceToValid(), folly::IOBufQueue::appendToString(), folly::gen::chunked(), fizz::server::AeadTokenCipher< AeadType, HkdfType >::clearSecrets(), fizz::KeyScheduler::clientKeyUpdate(), fizz::OpenSSLEVPCipher< EVPImpl >::createIV(), fizz::server::AeadTokenCipher< AeadType, HkdfType >::decrypt(), fizz::KeyScheduler::deriveAppTrafficSecrets(), fizz::KeyScheduler::deriveEarlySecret(), fizz::KeyScheduler::deriveHandshakeSecret(), fizz::KeyScheduler::deriveMasterSecret(), folly::io::Codec::doCompressString(), folly::io::StreamCodec::doUncompress(), folly::io::Codec::doUncompressString(), folly::AsyncIO::doWait(), fizz::sm::encodeAndAddBinders(), fizz::server::AeadTokenCipher< AeadType, HkdfType >::encrypt(), fizz::HkdfImpl< Hash >::expand(), fizz::HkdfImpl< Hash >::extract(), folly::for_each_detail::for_each_impl(), folly::for_each_detail::for_each_range_impl(), folly::IPAddressV6::fromInverseArpaName(), fizz::sm::generateTicket(), fizz::sm::getCertificateRequest(), fizz::EncryptedReadRecordLayer::getDecryptedBuf(), fizz::sm::getEarlyDataParams(), fizz::Exporter::getEkm(), folly::IPAddressV6::getMacAddressFromEUI64(), fizz::sm::getMaxEarlyDataSize(), fizz::sm::getReplayCacheResult(), fizz::KeyScheduler::getSecret(), fizz::sm::handleCertMsg(), folly::io::test::hashIOBuf(), fizz::HkdfImpl< Hash >::hkdf(), fizz::sm::negotiatePsk(), folly::pushmi::operators::from_fn::operator()(), folly::pushmi::operators::flow_from_fn::operator()(), preallocate_postallocate_bench(), folly::test::detail::random(), folly::sync_tests::randomSleep(), wangle::SocketPeeker::readDataAvailable(), fizz::KeyScheduler::serverKeyUpdate(), fizz::server::test::FizzTestServer::setResumption(), fizz::server::AeadTokenCipher< AeadType, HkdfType >::setSecrets(), fizz::test::HandshakeTest::SetUp(), fizz::sm::setupSchedulerAndContext(), stripLeftMargin(), fizz::test::TEST(), fizz::testing::TEST(), folly::test::TEST(), TEST(), fizz::test::TEST_F(), fizz::testing::TEST_P(), TEST_P(), testRangeFunc(), fizz::test::TYPED_TEST(), and fizz::EncryptedWriteRecordLayer::write().
constexpr auto folly::range | ( | Collection & | v | ) | -> Range<decltype(v.data())> |
Definition at line 1123 of file Range.h.
constexpr auto folly::range | ( | Collection const & | v | ) | -> Range<decltype(v.data())> |
Definition at line 1127 of file Range.h.
|
inlinenoexcept |
|
inline |
Definition at line 385 of file Rcu.h.
References rcu_default_domain_.
Referenced by rcu_retire(), folly::rcu_obj_base< T, D, Tag >::retire(), and TEST().
FOLLY_STATIC_CTOR_PRIORITY_MAX folly::Indestructible<rcu_domain<RcuTag>*> folly::rcu_default_domain_ | ( | folly::detail::createGlobal< rcu_domain< RcuTag >, RcuTag > | () | ) |
void folly::rcu_retire | ( | T * | p, |
D | d = {} , |
||
rcu_domain< Tag > * | domain = rcu_default_domain() |
||
) |
Definition at line 466 of file Rcu.h.
References folly::rcu_domain< Tag >::call(), folly::gen::move, rcu_default_domain(), and T.
Referenced by TEST(), and tryretire().
|
static |
Definition at line 242 of file Benchmark.cpp.
References humanReadable(), and kTimeSuffixes.
Referenced by printResultComparison().
bool folly::readFile | ( | int | fd, |
Container & | out, | ||
size_t | num_bytes = std::numeric_limits<size_t>::max() |
||
) |
Read entire file (if num_bytes is defaulted) or no more than num_bytes (otherwise) into container *out. The container is assumed to be contiguous, with element size equal to 1, and offer size(), reserve(), and random access (e.g. std::vector<char>, std::string, fbstring).
Returns: true on success or false on failure. In the latter case errno will be set appropriately by the failing system primitive.
Definition at line 125 of file FileUtil.h.
References min, readFull(), and SCOPE_EXIT.
Referenced by fizz::server::test::FizzTestServer::enableClientAuthWithChain(), fizz::tool::fizzClientCommand(), fizz::tool::fizzServerCommand(), getFileAsBuf(), wangle::FilePersistenceLayer< K, V >::load(), StaticService::StaticHandler::onEgressResumed(), wangle::MultiFilePoller::onFileUpdated(), StaticService::StaticHandler::onRequest(), folly::PasswordInFile::PasswordInFile(), wangle::TLSCredProcessor::processTLSTickets(), PushService::PushRequestHandler::PushRequestHandler(), folly::test::CaptureFD::read(), fizz::FizzUtil::readChainFile(), folly::test::WriteFileAtomic::readData(), readFile(), fizz::FizzUtil::readPrivateKey(), folly::ssl::OpenSSLCertUtils::readStoreFromFile(), resultsFromFile(), TEST(), folly::test::TEST(), TEST_F(), and folly::test::TEST_F().
bool folly::readFile | ( | const char * | file_name, |
Container & | out, | ||
size_t | num_bytes = std::numeric_limits<size_t>::max() |
||
) |
Same as above, but takes in a file name instead of fd
Definition at line 175 of file FileUtil.h.
References closeNoInt(), openNoInt(), readFile(), and SCOPE_EXIT.
FOLLY_NODISCARD ssize_t folly::readFull | ( | int | fd, |
void * | buf, | ||
size_t | n | ||
) |
Wrapper around read() (and pread()) that, in addition to retrying on EINTR, will loop until all data is read.
This wrapper is only useful for blocking file descriptors (for non-blocking file descriptors, you have to be prepared to deal with incomplete reads anyway), and only exists because POSIX allows read() to return an incomplete read if interrupted by a signal (instead of returning -1 and setting errno to EINTR).
Note that this wrapper weakens the thread safety of read(): the file pointer is shared between threads, but the system call is atomic. If multiple threads are reading from a file at the same time, you don't know where your data came from in the file, but you do know that the returned bytes were contiguous. You can no longer make this assumption if using readFull(). You should probably use pread() when reading from the same file descriptor from multiple threads simultaneously, anyway.
Note that readvFull and preadvFull require iov to be non-const, unlike readv and preadv. The contents of iov after these functions return is unspecified.
Definition at line 126 of file FileUtil.cpp.
References fizz::detail::read(), and folly::fileutil_detail::wrapFull().
Referenced by readFile(), folly::symbolizer::LineReader::readLine(), shutdownNoInt(), and TEST().
ssize_t folly::readNoInt | ( | int | fd, |
void * | buf, | ||
size_t | count | ||
) |
Definition at line 102 of file FileUtil.cpp.
References fizz::detail::read(), and folly::fileutil_detail::wrapNoInt().
Referenced by folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::drainSignalsLocked(), folly::AsyncPipeReader::handlerReady(), folly::Subprocess::ReadLinesCallback< Callback >::operator()(), folly::Subprocess::pid(), folly::Subprocess::readChildErrorPipe(), StaticService::StaticHandler::readFile(), readThread(), and shutdownNoInt().
FOLLY_NODISCARD ssize_t folly::readvFull | ( | int | fd, |
iovec * | iov, | ||
int | count | ||
) |
Definition at line 142 of file FileUtil.cpp.
References folly::fileutil_detail::wrapvFull().
Referenced by shutdownNoInt().
ssize_t folly::readvNoInt | ( | int | fd, |
const iovec * | iov, | ||
int | count | ||
) |
Definition at line 110 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by shutdownNoInt().
auto folly::reduce | ( | Collection && | c, |
T && | initial, | ||
F && | func | ||
) | -> decltype(reduce( c.begin(), c.end(), std::forward<T>(initial), std::forward<F>(func))) |
Sugar for the most common case.
Definition at line 462 of file helpers.h.
References c, reduce(), T, and unorderedReduce().
Future< T > folly::reduce | ( | It | first, |
It | last, | ||
T && | initial, | ||
F && | func | ||
) |
repeatedly calls func on every result, e.g. reduce(reduce(reduce(T initial, result of first), result of second), ...)
The type of the final result is a Future of the type of the initial value.
Func can either return a T, or a Future<T>
func is called in order of the input, see unorderedReduce if that is not a requirement
Definition at line 1753 of file Future-inl.h.
References collectAllSemiFuture(), f, folly::gen::first, folly::Future< T >::makeFuture, folly::gen::move, folly::pushmi::detail::t, type, and folly::futures::detail::FutureBase< T >::value().
Referenced by folly::Future< folly::folly::Unit >::onError(), reduce(), and TEST().
Definition at line 1744 of file FBVector.h.
References T.
Referenced by test_I_attach3(), and test_relinquish3().
void folly::reserveInTargetDelim | ( | const Delimiter & | d, |
const Ts &... | vs | ||
) |
Definition at line 796 of file Conv.h.
References folly::detail::getLastElement(), and type.
Referenced by toAppendStrImpl().
|
inline |
Like calling s.resize(n), but when growing the string does not initialize new elements. It is undefined behavior to read from any element added to the string by this method unless it has been written to by an operation that follows this call.
IMPORTANT: Read the warning at the top of this header file.
Definition at line 86 of file UninitializedMemoryHacks.h.
References T, type, folly::detail::unsafeStringSetLargerSize(), and value.
Referenced by doResizeWithoutInit(), and testRandom().
void folly::resizeWithoutInitialization | ( | std::vector< T > & | v, |
std::size_t | n | ||
) |
Like calling v.resize(n), but when growing the vector does not construct or initialize new elements. It is undefined behavior to read from any element added to the vector by this method unless it has been written to by an operation that follows this call.
Use the FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT(T) macro to declare (and inline define) the internals required to call resizeWithoutInitialization for a std::vector<T>. This must be done exactly once in each translation unit that wants to call resizeWithoutInitialization(std::vector<T>&,size_t). char and unsigned char are provided by default. If you don't do this you will get linker errors about folly::detail::unsafeVectorSetLargerSize. Requiring that T be trivially_destructible is only an approximation of the property required of T. In fact what is required is that any random sequence of bytes may be safely reinterpreted as a T and passed to T's destructor.
std::vector<bool> has specialized internals and is not supported.
IMPORTANT: Read the warning at the top of this header file.
Definition at line 125 of file UninitializedMemoryHacks.h.
References B, s, string, T, folly::detail::unsafeStringSetLargerSize(), and folly::detail::unsafeVectorSetLargerSize().
|
static |
Definition at line 366 of file Benchmark.cpp.
References folly::detail::BenchmarkResult::file, and folly::detail::BenchmarkResult::name.
Referenced by printResultComparison().
vector<detail::BenchmarkResult> folly::resultsFromFile | ( | const std::string & | filename | ) |
Definition at line 26 of file BenchmarkCompare.cpp.
References benchmarkResultsFromDynamic(), parseJson(), and readFile().
Referenced by compareBenchmarkResults().
size_t folly::rfind | ( | const Range< Iter > & | haystack, |
const typename Range< Iter >::value_type & | needle | ||
) |
Finds the last occurrence of needle in haystack. The result is the offset reported to the beginning of haystack, or string::npos if needle wasn't found.
Definition at line 1404 of file Range.h.
References i, and folly::Range< Iter >::size().
Referenced by getContainingDirectory(), folly::Range< unsigned char * >::rfind(), folly::basic_fbstring< char >::rfind(), folly::BasicFixedString< Char, N >::rfind(), and TEST().
|
inline |
Definition at line 1428 of file Range.h.
References folly::Range< Iter >::data(), folly::Range< Iter >::empty(), memrchr(), needle, and folly::Range< Iter >::size().
|
inline |
Definition at line 1453 of file Range.h.
References folly::Range< Iter >::data(), folly::Range< Iter >::empty(), memrchr(), needle, and folly::Range< Iter >::size().
auto folly::rlock | ( | const Synchronized< Data, Mutex > & | synchronized, |
Args &&... | args | ||
) |
Definition at line 1523 of file Synchronized.h.
References testing::Args(), D, M, and folly::detail::rlock().
Referenced by folly::RequestContext::onSet(), folly::threadlocal_detail::StaticMetaBase::onThreadExit(), folly::RequestContext::onUnset(), TEST(), folly::SynchronizedPtr< PointerType, MutexType >::withRLock(), folly::SynchronizedBase< Subclass, detail::MutexLevel::SHARED >::withRLock(), and folly::SynchronizedBase< Subclass, detail::MutexLevel::SHARED >::withRLockPtr().
|
noexcept |
Definition at line 149 of file RValueReferenceWrapper.h.
References folly::gen::move, folly::pushmi::__adl::noexcept(), T, and value().
Referenced by TEST().
|
deletenoexcept |
StringPiece folly::rtrimWhitespace | ( | StringPiece | sp | ) |
Returns a subpiece with all whitespace removed from the back of . Whitespace means any of [' ', '
', '', ''].
Definition at line 149 of file String.cpp.
References folly::Range< Iter >::back(), folly::Range< Iter >::empty(), format(), is_oddspace(), gmock_output_test::output, folly::Range< Iter >::pop_back(), and string.
Referenced by join(), TEST(), and trimWhitespace().
|
static |
Definition at line 30 of file ScopedEventBaseThread.cpp.
References folly::EventBaseManager::clearEventBase(), folly::EventBase::loopForever(), folly::EventBase::runOnDestruction(), folly::EventBaseManager::setEventBase(), setThreadName(), folly::Range< Iter >::size(), folly::Baton< MayBlock, Atom >::wait(), and folly::EventBase::~EventBase().
Referenced by BENCHMARK(), ClientRunner::ClientRunner(), dummy(), folly::NestedCommandLineApp::globalOptions(), folly::ScopedEventBaseThread::ScopedEventBaseThread(), folly::FunctionScheduler::start(), TEST(), and folly::fibers::InlineFunctionRunner::~InlineFunctionRunner().
|
static |
Definition at line 125 of file Benchmark.cpp.
References count, estimateTime(), fun(), max, now(), uint32_t, and value.
Referenced by runBenchmarks().
folly::runBenchmarks | ( | ) |
Runs all benchmarks defined. Usually put in main().
Definition at line 456 of file Benchmark.cpp.
References benchmarks(), checkRunMode(), empty(), FOR_EACH_RANGE, getGlobalBenchmarkBaselineIndex(), i, printBenchmarkResults(), runBenchmarkGetNSPerIteration(), and size().
Referenced by main(), runBenchmarksOnFlag(), and TEST().
|
inline |
Runs all benchmarks defined if and only if the –benchmark flag has been passed to the program. Usually put in main().
Definition at line 48 of file Benchmark.h.
References runBenchmarks().
Referenced by main().
void folly::runReader | ( | LockFreeRingBuffer< int, Atom > & | rb, |
std::atomic< int32_t > & | writes | ||
) |
Definition at line 109 of file LockFreeRingBufferTest.cpp.
References Atom, int32_t, and folly::LockFreeRingBuffer< T, Atom >::write().
void folly::runWritesNeverFail | ( | int | capacity, |
int | writes, | ||
int | writers | ||
) |
Definition at line 119 of file LockFreeRingBufferTest.cpp.
References folly::netops::bind(), folly::LockFreeRingBuffer< T, Atom >::currentHead(), EXPECT_EQ, i, join, and threads.
Returns the position of the k-th 1 in the 64-bit word x. k is 0-based, so k=0 returns the position of the first 1.
Uses the broadword selection algorithm by Vigna [1], improved by Gog and Petri [2] and Vigna [3].
[1] Sebastiano Vigna. Broadword Implementation of Rank/Select Queries. WEA, 2008
[2] Simon Gog, Matthias Petri. Optimized succinct data structures for massive data. Softw. Pract. Exper., 2014
[3] Sebastiano Vigna. MG4J 5.2.1. http://mg4j.di.unimi.it/
Definition at line 69 of file Select64.h.
References FOLLY_ALWAYS_INLINE, folly::detail::kSelectInByte, popcount(), s, uint64_t, and x.
FOLLY_ALWAYS_INLINE uint64_t folly::select64< compression::instructions::Haswell > | ( | uint64_t | x, |
uint64_t | k | ||
) |
Definition at line 91 of file Select64.h.
int folly::setCloseOnExec | ( | int | fd, |
int | value | ||
) |
Definition at line 61 of file AsyncServerSocket.cpp.
Referenced by folly::AsyncServerSocket::setupSocket().
void folly::setCPUExecutor | ( | std::weak_ptr< folly::Executor > | executor | ) |
Set an Executor to be the global Executor which will be returned by subsequent calls to getCPUExecutor().
Definition at line 97 of file GlobalExecutor.cpp.
References folly::gen::move, and singleton.
Referenced by main(), and TEST().
void folly::setIOExecutor | ( | std::weak_ptr< IOExecutor > | executor | ) |
Set an IOExecutor to be the global IOExecutor which will be returned by subsequent calls to getIOExecutor().
Definition at line 110 of file GlobalExecutor.cpp.
References folly::gen::move, and singleton.
Referenced by TEST().
bool folly::setThreadName | ( | std::thread::id | tid, |
StringPiece | name | ||
) |
Set the name of the given thread. Returns false on failure, if an error occurs or the functionality is not available.
Definition at line 109 of file ThreadName.cpp.
References folly::Range< Iter >::data(), kMaxThreadNameLength, folly::Range< Iter >::size(), folly::Range< Iter >::str(), and folly::Range< Iter >::subpiece().
Referenced by folly::ThreadedRepeatingFunctionRunner::add(), folly::ThreadedExecutor::control(), folly::observer_detail::ObserverManager::CurrentQueue::CurrentQueue(), folly::AsyncFileWriter::ioThread(), folly::EventBase::loopBody(), folly::NamedThreadFactory::newThread(), run(), folly::FunctionScheduler::run(), folly::EventBase::setName(), setThreadName(), proxygen::ScopedHTTPServer::start(), wangle::LRUPersistentCache< K, V, MutexT >::syncThreadMain(), and TEST().
bool folly::setThreadName | ( | pthread_t | pid, |
StringPiece | name | ||
) |
bool folly::setThreadName | ( | StringPiece | name | ) |
Equivalent to setThreadName(std::this_thread::get_id(), name);
Definition at line 202 of file ThreadName.cpp.
References setThreadName().
void folly::setupSSLLocks | ( | ) |
Definition at line 26 of file SSLContextInitializationTest.cpp.
References folly::ssl::NONE, folly::ssl::setLockTypes(), and folly::ssl::SPINLOCK.
Referenced by TEST().
|
inline |
Like format(), but immediately returns the formatted string instead of an intermediate format object.
Definition at line 280 of file Format.h.
References format().
Referenced by folly::NestedCommandLineApp::addCommand(), detail::addHashBenchmark(), folly::dynamic::at(), folly::dynamic::atImpl(), BENCHMARK(), BENCHMARK_RELATIVE(), folly::ssl::OpenSSLHash::check_out_size_throw(), folly::fibers::detail::createABDTokenNotDispatchedExMsg(), folly::fibers::detail::createUnexpectedNumResultsABDUsageExMsg(), folly::observer_detail::ObserverManager::CurrentQueue::CurrentQueue(), TestExtendingFormatter< containerMode, Args >::doFormatArg(), folly::NestedCommandLineApp::doRun(), folly::detail::familyNameStrDefault(), folly::NestedCommandLineApp::findCommand(), folly::LogStreamProcessor::formatLogString(), folly::CustomLogFormatter::formatMessage(), folly::IPAddressV4::fromInverseArpaName(), folly::IPAddressV6::fromInverseArpaName(), folly::SocketAddress::getAddrInfo(), getExe(), folly::SocketAddress::getIpString(), folly::IPAddressV6::getIPv4For6To4(), folly::AsyncSocketException::getMessage(), folly::detail::getNthMSBitImplThrow(), folly::IPAddressV4::getNthMSByte(), folly::IPAddressV6::getNthMSByte(), folly::detail::handleMallctlError(), proxygen::hexStr(), folly::IPAddressV4::inSubnet(), folly::IPAddressV6::inSubnet(), folly::detail::Bytes::longestCommonPrefix(), folly::IPAddressV4::mask(), folly::IPAddressV6::mask(), TryWriteUntilCaller< Q, Clock, Duration >::methodName(), operator<(), folly::MacAddress::parse(), parseLeadingNumber(), producerConsumerBench(), FileServerHandler::read(), FileServerHandler::readException(), fizz::FizzUtil::readPrivateKey(), folly::NestedCommandLineApp::run(), folly::MacAddress::setFromBinary(), wangle::ContextImplBase< H, InboundHandlerContext< H::rout > >::setNextIn(), wangle::ContextImplBase< H, InboundHandlerContext< H::rout > >::setNextOut(), folly::detail::shellify(), folly::detail::singletonThrowNullCreator(), folly::IPAddressV6::str(), TEST(), fizz::client::test::TEST_F(), wangle::TEST_F(), testCmp(), folly::AsyncSSLSocket::timeoutExpired(), folly::AsyncSocket::timeoutExpired(), toAppend(), folly::IPAddressV4::toInverseArpaName(), folly::IPAddressV6::toInverseArpaName(), folly::IPAddressV4::toJson(), folly::IPAddressV6::toJson(), folly::IPAddressV4::toLong(), and validateTestCertBundle().
|
inline |
Definition at line 469 of file Format.h.
References formatChecked().
std::vector<std::string> folly::shellify | ( | StringPiece | format, |
Arguments &&... | arguments | ||
) |
Create argument array for Subprocess()
for a process running in a shell.
The shell to use is always going to be /bin/sh
.
This is deprecated in favour of the user-defined-literal _shellify
from namespace folly::shell_literals
because that requires that the format string is a compile-time constant which can be inspected during code reviews
Definition at line 88 of file Shell.h.
References folly::detail::shellify().
Referenced by folly::detail::ShellCmdFormat::operator()(), and TEST().
std::string folly::shellQuote | ( | StringPiece | argument | ) |
Quotes an argument to make it suitable for use as shell command arguments.
Definition at line 21 of file Shell.cpp.
Referenced by folly::detail::shellify(), and TEST().
void folly::shutdown | ( | Counter & | ) |
Definition at line 24 of file RefCountBenchmark.cpp.
Referenced by benchmark(), folly::portability::ssl::BIO_set_shutdown(), folly::AsyncSocket::handleConnect(), folly::AsyncSocket::handleWrite(), UDPClient::onDataAvailable(), UDPClient::sendPing(), folly::AsyncSocket::shutdownWriteNow(), UDPClient::start(), folly::test::Server::stop(), TEST(), TEST_P(), UDPClient::timeoutExpired(), and folly::FunctionScheduler::~FunctionScheduler().
void folly::shutdown | ( | TLRefCount & | c | ) |
Definition at line 26 of file RefCountBenchmark.cpp.
References c, and folly::TLRefCount::useGlobal().
|
inline |
Definition at line 53 of file FileUtil.h.
References count, FOLLY_NODISCARD, folly::NetworkSocket::fromFd(), preadFull(), preadNoInt(), preadvFull(), pwriteFull(), pwriteNoInt(), pwritevFull(), readFull(), readNoInt(), readvFull(), readvNoInt(), shutdownNoInt(), writeFull(), writeNoInt(), writevFull(), and writevNoInt().
int folly::shutdownNoInt | ( | NetworkSocket | fd, |
int | how | ||
) |
Definition at line 98 of file FileUtil.cpp.
References folly::netops::shutdown(), and folly::fileutil_detail::wrapNoInt().
Referenced by folly::ShutdownSocketSet::doShutdown(), shutdownNoInt(), and folly::AsyncServerSocket::stopAccepting().
constexpr auto folly::size | ( | C const & | c | ) | -> decltype(c.size()) |
Definition at line 45 of file Access.h.
References c.
Referenced by folly::Range< unsigned char * >::advance(), alignedForwardMemcpy(), folly::Arena< SysAllocator< void > >::allocate(), folly::fibers::Fiber::LocalData::allocateHeapBuffer(), folly::Arena< Alloc >::allocateSlow(), folly::basic_fbstring< E, T, A, Storage >::append(), testing::internal::ArrayEq(), folly::basic_fbstring< E, T, A, Storage >::assign(), folly::Range< unsigned char * >::at(), folly::small_vector< Observer< T > *, InlineObservers >::at(), folly::basic_fbstring< char >::at(), folly::Uri::authority(), folly::BasicFixedString< Char, N >::BasicFixedString(), BENCHMARK(), benchmarkGet(), benchmarkSet(), folly::fibers::StackCache::borrow(), folly::bser::bserEncodeInt(), folly::ssl::OpenSSLHash::check_out_size(), checkTracepointArguments(), clause11_21_4_2_j(), clause11_21_4_2_k(), folly::IOBuf::cloneOneInto(), folly::Range< unsigned char * >::compare(), folly::basic_fbstring< char >::compare(), fizz::ZlibCertificateCompressor::compress(), constexpr_find_first_set(), folly::basic_fbstring< char >::copy(), testing::internal::CopyArray(), folly::IOBuf::copyBuffer(), folly::fbstring_core< Char >::copyLarge(), folly::fbstring_core< Char >::copySmall(), folly::detail::SkipListNode< T >::create(), folly::fbstring_core< Char >::RefCounted::create(), folly::io::test::DataHolder::data(), deallocateBytes(), folly::bser::decodeArray(), proxygen::HPACKDecodeBuffer::decodeLiteral(), folly::bser::decodeObject(), folly::bser::decodeTemplate(), fizz::ZlibCertificateDecompressor::decompress(), demangle(), folly::detail::SkipListNode< T >::destroy(), folly::detail::digits_to(), doEmptyHeaderValueTest(), folly::small_vector< Observer< T > *, InlineObservers >::emplace_back(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::empty(), folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::empty(), folly::AtomicHashMap< int64_t, int64_t >::empty(), folly::small_vector< Observer< T > *, InlineObservers >::empty(), folly::basic_fbstring< char >::empty(), proxygen::HPACKEncodeBuffer::encodeHuffman(), encryptGCM(), folly::small_vector< Observer< T > *, InlineObservers >::end(), folly::Range< unsigned char * >::endsWith(), folly::Range< unsigned char * >::equals(), folly::small_vector< Observer< T > *, InlineObservers >::erase(), folly::basic_fbstring< char >::erase(), folly::fbstring_core< Char >::expandNoinit(), folly::dummy_fbstring_core< Char >::expandNoinit(), folly::fbstring_core< char >::fbstring_core(), folly::Range< unsigned char * >::find(), folly::basic_fbstring< E, T, A, Storage >::find(), folly::Range< unsigned char * >::find_first_of(), folly::basic_fbstring< E, T, A, Storage >::find_last_not_of(), findLastSet(), folly::Fingerprint< BITS >::Fingerprint(), folly::for_each_detail::for_each_tuple_impl(), folly::io::RWCursor< access >::gatherAtMost(), proxygen::HTTPCodec::generateConnectionPreface(), proxygen::HTTP2Codec::generateHeaderImpl(), proxygen::HTTP2Codec::generateTrailers(), folly::fibers::Fiber::LocalData::get(), get_rand_str(), proxygen::huffman::HuffTree::getEncodeSize(), proxygen::HTTP2Codec::getHeaderIndexingStrategy(), folly::basic_fbstring< E, T, A, Storage >::getlineImpl(), proxygen::Window::getNonNegativeSize(), folly::BlockingQueue< folly::CPUThreadPoolExecutor::CPUTask >::getNumPriorities(), proxygen::HTTPArchive::getSize(), getSynStream(), testing::TestPartResultArray::GetTestPartResult(), proxygen::HTTP2Codec::getUserAgent(), folly::ArenaAllocatorTraits< Alloc >::goodSize(), folly::io::test::DataHolder::hash(), folly::Range< unsigned char * >::hash(), folly::ssl::OpenSSLHash::Digest::hash_final(), folly::ssl::OpenSSLHash::Hmac::hash_final(), i64ToStringFollyMeasureNeg(), i64ToStringFollyMeasurePos(), folly::MemoryMapping::init(), proxygen::HTTPCommonHeaders::initHeaderNames(), folly::fbstring_core< Char >::initLarge(), folly::fbstring_core< Char >::initMedium(), folly::AtomicHashMap< int64_t, int64_t >::insert(), folly::small_vector< Observer< T > *, InlineObservers >::insert(), folly::small_vector< Observer< T > *, InlineObservers >::insertImpl(), folly::basic_fbstring< E, T, A, Storage >::insertImpl(), folly::basic_fbstring< E, T, A, Storage >::insertImplDiscr(), folly::detail::internalJoin(), folly::detail::MPMCQueueBase< Derived< T, Atom, Dynamic > >::isEmpty(), folly::detail::MPMCQueueBase< Derived< T, Atom, Dynamic > >::isFull(), isSane(), folly::basic_fbstring< char >::isSane(), folly::test::IovecBuffers::join(), folly::basic_fbstring< char >::length(), folly::small_vector< Observer< T > *, InlineObservers >::makeSize(), folly::AsyncSSLSocketWriteTest::makeVec(), testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::MatchAndExplain(), proxygen::MATCHER_P(), testing::internal::NoDefaultContructor::NoDefaultContructor(), proxygen::HTTPSession::numIncomingStreams(), folly::IOBuf::operator new(), folly::fibers::FiberManager::FibersPoolResizer::operator()(), operator<<(), folly::StringKeyedMap< Value, Compare, Alloc >::operator=(), folly::StringKeyedSetBase< Compare, Alloc >::operator=(), folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=(), folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=(), folly::basic_fbstring< E, T, A, Storage >::operator=(), folly::small_vector< Observer< T > *, InlineObservers >::operator==(), testing::internal::NativeArray< Element >::operator==(), folly::Range< unsigned char * >::operator[](), folly::small_vector< Observer< T > *, InlineObservers >::operator[](), proxygen::PassThroughHTTPCodecFilter::PassThroughHTTPCodecFilter(), fizz::passwordCallback(), folly::AsyncFileWriter::performIO(), preallocate_postallocate_bench(), folly::FileWriterFactory::processOption(), randomBinaryString(), randomString(), folly::Range< unsigned char * >::Range(), fizz::detail::Reader< ServerName >::read(), folly::test::MockReadCallback::readDataAvailable(), proxygen::readFileToIOBuf(), folly::test::CaptureFD::readIncremental(), readNote(), folly::JemallocNodumpAllocator::reallocate(), folly::basic_fbstring< char >::replace(), folly::basic_fbstring< E, T, A, Storage >::replaceAliased(), folly::Range< unsigned char * >::replaceAt(), reserve(), folly::fbstring_core< Char >::reserveSmall(), folly::Range< unsigned char * >::reset(), folly::small_vector< Observer< T > *, InlineObservers >::resize(), folly::basic_fbstring< E, T, A, Storage >::resize(), proxygen::HTTPTransaction::resumeIngress(), runBenchmarks(), proxygen::HTTPTransaction::sendAbort(), proxygen::HTTPSession::sendHeaders(), proxygen::HTTPTransaction::sendHeadersWithOptionalEOM(), proxygen::HTTPSession::sendSettings(), proxygen::Window::setCapacity(), wangle::LoadShedConfiguration::setCpuUsageExceedWindowSize(), proxygen::HTTPMessage::setIngressHeaderSize(), folly::AsyncFileWriter::setMaxBufferSize(), fizz::EncryptedWriteRecordLayer::setMaxRecord(), fizz::EncryptedWriteRecordLayer::setMinDesiredRecord(), setNumbers(), folly::fbstring_core< char >::setSmallSize(), proxygen::ServiceConfiguration::setWriteBufferLimit(), folly::dummy_fbstring_core< Char >::shrink(), folly::basic_fbstring< char >::shrink_to_fit(), testing::internal::ShuffleRange(), sizeCtor(), folly::io::test::CompressionTest::split(), folly::Range< unsigned char * >::split_step(), folly::SSLContext::sslAcceptRunner(), folly::Range< unsigned char * >::startsWith(), folly::detail::str_to_floating(), stringPieceDup(), folly::Range< unsigned char * >::subpiece(), folly::basic_fbstring< char >::substr(), folly::Range< unsigned char * >::subtract(), proxygen::HTTP1xCodec::supportsPushTransactions(), proxygen::SPDYCodec::supportsPushTransactions(), folly::small_vector< Observer< T > *, InlineObservers >::swap(), folly::IOBuf::takeOwnership(), fizz::test::TEST(), TEST(), TEST(), testing::internal::TEST(), TEST_F(), proxygen::TEST_P(), testing::gmock_matchers_test::TEST_P(), testing::TestPartResultArray::TestPartResultArray(), to(), folly::basic_fbstring< char >::toStdString(), folly::detail::GroupVarintBase< T >::totalSize(), proxygen::HTTPTransactionTransportCallback::trackedByteFlushed(), type_pretty_name(), u64ToStringClibMeasure(), u64ToStringFollyMeasure(), folly::Range< unsigned char * >::uncheckedAdvance(), folly::Range< unsigned char * >::uncheckedSubpiece(), folly::Range< unsigned char * >::uncheckedSubtract(), unhexlify(), verify(), folly::f14::detail::F14BasicSet< Key, Hasher, KeyEqual, Alloc >::visitAllocationClasses(), folly::f14::detail::F14BasicMap< Key, Mapped, Hasher, KeyEqual, Alloc >::visitAllocationClasses(), folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::TaggedPtr::withSizeDecr(), folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::TaggedPtr::withSizeIncr(), folly::IOBuf::wrapBufferAsValue(), folly::Fingerprint< BITS >::write(), fizz::client::AsyncFizzClientT< SM >::writeAppData(), folly::test::MockWriteCallback::writeErr(), folly::Fingerprint< BITS >::xortab(), testing::internal::GTestFlagSaver::~GTestFlagSaver(), proxygen::huffman::HuffTree::~HuffTree(), proxygen::HeaderCodec::Stats::~Stats(), and proxygen::HTTPTransaction::Transport::~Transport().
|
noexcept |
folly::std enable_if::typetoAppendDelimStrImpl const Delimiter, const Tv, Tgtresult folly::sizeof | ( | Ts | ) |
|
inline |
Returns a subpiece with all whitespace removed from the front of . Whitespace means any of [' ', '
', '', '']. DEPRECATED:
Definition at line 577 of file String.h.
References ltrimWhitespace(), s, string, stripLeftMargin(), and toLowerAscii().
|
inline |
This function tries to reallocate a buffer of which only the first currentSize bytes are used. The problem with using realloc is that if currentSize is relatively small and if realloc decides it needs to move the memory chunk to a new buffer, then realloc ends up copying data that is not used. It's generally not a win to try to hook in to realloc() behavior to avoid copies - at least in jemalloc, realloc() almost always ends up doing a copy, because there is little fragmentation / slack space to take advantage of.
Definition at line 261 of file Malloc.h.
References checkedMalloc(), checkedRealloc(), and bm::free().
Referenced by folly::fbstring_core< Char >::RefCounted::reallocate(), and folly::fbstring_core< Char >::reserveMedium().
Definition at line 36 of file ThenCompileTest.h.
References makeFuture(), and T.
void folly::split | ( | const Delim & | delimiter, |
const String & | input, | ||
std::vector< OutputType > & | out, | ||
bool | ignoreEmpty | ||
) |
Definition at line 382 of file String-inl.h.
References folly::detail::prepareDelim().
Referenced by BENCHMARK(), BENCHMARK_RELATIVE(), proxygen::checkForProtocolUpgrade(), checkTracepointArguments(), folly::IPAddressV4::fromInverseArpaName(), folly::IPAddressV6::fromInverseArpaName(), proxygen::HTTP1xCodec::generateHeader(), CurlService::CurlClient::parseHeaders(), parseLogConfig(), proxygen::RFC2616::parseQvalues(), proxygen::compress::prepareMessageForCompression(), readNote(), folly::io::test::StreamingCompressionTest::runCompressStreamTest(), folly::io::test::StreamingCompressionTest::runFlushTest(), folly::io::test::CompressionTest::runSimpleIOBufTest(), folly::io::test::AutomaticCodecTest::runSimpleTest(), folly::io::test::CompressionTest::SetUp(), folly::io::test::StreamingCompressionTest::SetUp(), folly::io::test::CompressionTest::split(), stripLeftMargin(), TEST(), and toAppend().
void folly::split | ( | const Delim & | delimiter, |
const String & | input, | ||
fbvector< OutputType > & | out, | ||
bool | ignoreEmpty | ||
) |
bool::type folly::split | ( | const Delim & | delimiter, |
StringPiece | input, | ||
OutputTypes &... | outputs | ||
) |
FutureSplitter<T> folly::splitFuture | ( | Future< T > && | future | ) |
Convenience function, allowing us to exploit template argument deduction to improve readability.
Definition at line 99 of file FutureSplitter.h.
References folly::gen::move.
void folly::splitTo | ( | const Delim & | delimiter, |
const String & | input, | ||
OutputIterator | out, | ||
bool | ignoreEmpty | ||
) |
Definition at line 412 of file String-inl.h.
References folly::detail::prepareDelim(), type, and value().
void folly::sslsocketpair | ( | EventBase * | eventBase, |
AsyncSSLSocket::UniquePtr * | clientSock, | ||
AsyncSSLSocket::UniquePtr * | serverSock | ||
) |
Definition at line 141 of file AsyncSSLSocketTest.cpp.
References getctx(), and getfds().
Referenced by folly::TestSSLAsyncCacheServer::getSessionCallback().
|
inline |
Write an unaligned value of type T.
Definition at line 352 of file Bits.h.
References assume(), kHasUnalignedAccess, and T.
Referenced by folly::io::QueueAppender::write(), and folly::io::QueueAppender::writeSlow().
void folly::stressTest | ( | size_t | itersCount | ) |
std::string void std::string& folly::stringAppendf | ( | std::string * | output, |
FOLLY_PRINTF_FORMAT const char * | format, | ||
... | |||
) |
std::string& folly::stringAppendf | ( | std::string * | output, |
const char * | format, | ||
... | |||
) |
Definition at line 240 of file String.cpp.
References SCOPE_EXIT, string, and stringVAppendf().
Referenced by BENCHMARK(), TEST(), and uriUnescape().
void folly::stringPieceDel | ( | StringPiece | piece, |
const Alloc & | alloc | ||
) |
Definition at line 40 of file StringKeyedCommon.h.
References folly::Range< Iter >::data(), and folly::Range< Iter >::size().
Referenced by folly::StringKeyedSetBase< Compare, Alloc >::clear(), folly::StringKeyedMap< Value, Compare, Alloc >::clear(), folly::StringKeyedSetBase< Compare, Alloc >::erase(), folly::StringKeyedMap< Value, Compare, Alloc >::erase(), folly::StringKeyedMap< Value, Compare, Alloc >::~StringKeyedMap(), and folly::StringKeyedSetBase< Compare, Alloc >::~StringKeyedSetBase().
StringPiece folly::stringPieceDup | ( | StringPiece | piece, |
const Alloc & | alloc | ||
) |
Definition at line 28 of file StringKeyedCommon.h.
References folly::Range< Iter >::data(), size(), and folly::Range< Iter >::size().
Referenced by folly::StringKeyedSetBase< Compare, Alloc >::emplace(), folly::StringKeyedMap< Value, Compare, Alloc >::emplace(), folly::StringKeyedSetBase< Compare, Alloc >::insert(), folly::StringKeyedMap< Value, Compare, Alloc >::insert(), and folly::StringKeyedMap< Value, Compare, Alloc >::operator[]().
std::string folly::stringPrintf | ( | FOLLY_PRINTF_FORMAT const char * | format, |
... | |||
) |
stringPrintf is much like printf but deposits its result into a string. Two signatures are supported: the first simply returns the resulting string, and the second appends the produced characters to the specified string and returns a reference to it.
std::string void folly::stringPrintf | ( | std::string * | out, |
FOLLY_PRINTF_FORMAT const char * | fmt, | ||
... | |||
) |
std::string folly::stringPrintf | ( | const char * | format, |
... | |||
) |
Definition at line 223 of file String.cpp.
References SCOPE_EXIT, and stringVPrintf().
Referenced by wangle::SSLContextManager::addSSLContextConfig(), wangle::SSLContextManager::getSSLCtxByExactDomain(), wangle::SSLContextManager::getSSLCtxBySuffix(), humanReadable(), wangle::SSLContextManager::insertSSLCtxByDomainNameImpl(), stringPrintfOutputSize(), TEST(), and uriUnescape().
void folly::stringPrintf | ( | std::string * | output, |
const char * | format, | ||
... | |||
) |
Definition at line 255 of file String.cpp.
References SCOPE_EXIT, and stringVPrintf().
LogLevel folly::stringToLogLevel | ( | folly::StringPiece | name | ) |
Construct a LogLevel from a string name.
Definition at line 42 of file LogLevel.cpp.
References folly::Range< Iter >::advance(), c, CRITICAL, DBG, DFATAL, ERR, FATAL, INFO, deadlock::info(), MAX_LEVEL, NONE, folly::Range< Iter >::size(), UNINITIALIZED, and WARN.
Referenced by folly::StandardLogHandlerFactory::createHandler(), operator-=(), and TEST().
std::string & folly::stringVAppendf | ( | std::string * | output, |
const char * | format, | ||
va_list | ap | ||
) |
Definition at line 250 of file String.cpp.
References gmock_output_test::output.
Referenced by stringAppendf(), uriUnescape(), and vprintfCheck().
std::string void std::string std::string folly::stringVPrintf | ( | const char * | format, |
va_list | ap | ||
) |
Similar to stringPrintf, but accepts a va_list argument.
As with vsnprintf() itself, the value of ap is undefined after the call. These functions do not call va_end() on ap.
Definition at line 232 of file String.cpp.
References string.
Referenced by loggingFormatPrintf(), stringPrintf(), uriUnescape(), vprintfCheck(), and vprintfError().
void folly::stringVPrintf | ( | std::string * | output, |
const char * | format, | ||
va_list | ap | ||
) |
Definition at line 264 of file String.cpp.
std::string folly::stripLeftMargin | ( | std::string | s | ) |
Strips the leading and the trailing whitespace-only lines. Then looks for the least indented non-whitespace-only line and removes its amount of leading whitespace from every line. Assumes leading whitespace is either all spaces or all tabs.
Purpose: including a multiline string literal in source code, indented to the level expected from context.
Definition at line 704 of file String.cpp.
References c, join(), max, needle, range(), and split().
Referenced by skipWhitespace(), and TEST().
size_t folly::strlcpy | ( | char * | dest, |
const char *const | src, | ||
size_t | size | ||
) |
|
inline |
Like vformat(), but immediately returns the formatted string instead of an intermediate format object.
Definition at line 307 of file Format.h.
References vformat().
Referenced by TEST().
|
inline |
Definition at line 479 of file Format.h.
References testing::Args(), type, value, and vformatChecked().
|
noexcept |
Free function swap of hazptr_holder-s
Free function swap of hazptr_holder-s.
Definition at line 187 of file HazptrHolder.h.
References Atom, and folly::detail::rhs.
Referenced by folly::hazptr_holder< Atom >::swap().
|
noexcept |
Free function swap of hazptr_holder-s.
Definition at line 187 of file HazptrHolder.h.
References Atom, and folly::detail::rhs.
Referenced by folly::hazptr_holder< Atom >::swap().
|
noexcept |
Definition at line 202 of file PropagateConst.h.
|
noexcept |
|
inlinenoexcept |
|
inline |
Definition at line 579 of file sorted_vector_types.h.
References testing::Key(), folly::sorted_vector_set< T, Compare, Allocator, GrowthPolicy, Container >::swap(), and testing::Value().
|
inlinenoexcept |
Swaps the value of a
with the value of b
.
Definition at line 644 of file ExceptionWrapper.h.
References a, b, and exceptionStr().
Referenced by folly::detail::propagate_const_adl::adl_swap(), folly::exception_wrapper::exception_wrapper(), folly::Synchronized< std::vector< detail::folly::detail::TypeDescriptor >, folly::SharedMutexImpl >::exchange(), folly::fibers::SimpleLoopController::loop(), folly::coro::TaskWithExecutor< T >::operator=(), folly::coro::Task< T >::operator=(), folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::operator=(), folly::symbolizer::Dwarf::Path::Path(), poly_move(), folly::Optional< NamedGroup >::swap(), folly::padded::Adaptor< IntNodeVec >::swap(), folly::sorted_vector_set< folly::RequestData * >::swap(), folly::Replaceable< T >::swap(), folly::Synchronized< std::vector< detail::folly::detail::TypeDescriptor >, folly::SharedMutexImpl >::swap(), folly::sorted_vector_map< Key, Value, Compare, Allocator, GrowthPolicy, Container >::swap(), folly::Expected< int, E >::swap(), folly::Subprocess::takeOwnershipOfPipes(), TEST(), TEST(), and TEST_F().
|
noexcept |
Definition at line 816 of file Function.h.
References folly::detail::rhs.
Referenced by folly::Function< std::vector< ResultT >(std::vector< InputT > &&)>::swap().
|
inline |
Definition at line 1004 of file sorted_vector_types.h.
References folly::sorted_vector_map< Key, Value, Compare, Allocator, GrowthPolicy, Container >::swap().
Referenced by folly::sorted_vector_set< folly::RequestData * >::swap(), and folly::sorted_vector_map< Key, Value, Compare, Allocator, GrowthPolicy, Container >::swap().
Definition at line 1106 of file Range.h.
References folly::Range< Iter >::swap().
Referenced by folly::Range< unsigned char * >::swap().
void folly::swap | ( | small_vector< T, MaxInline, A, B, C > & | a, |
small_vector< T, MaxInline, A, B, C > & | b | ||
) |
Definition at line 1202 of file small_vector.h.
References folly::small_vector< Value, RequestedMaxInline, PolicyA, PolicyB, PolicyC >::swap().
Referenced by folly::small_vector< Observer< T > *, InlineObservers >::operator=(), folly::small_vector< Observer< T > *, InlineObservers >::small_vector(), folly::small_vector< Observer< T > *, InlineObservers >::swap(), and folly::detail::IntegralSizePolicyBase< SizeType, true >::swapSizePolicy().
|
noexcept |
swap Expected values
Definition at line 1368 of file Expected.h.
Referenced by folly::Expected< int, E >::swap().
void folly::swap | ( | Synchronized< T, M > & | lhs, |
Synchronized< T, M > & | rhs | ||
) |
Definition at line 1656 of file Synchronized.h.
References folly::Synchronized< T, Mutex >::swap().
Referenced by folly::Synchronized< std::vector< detail::folly::detail::TypeDescriptor >, folly::SharedMutexImpl >::swap().
|
noexcept |
Definition at line 1697 of file FBVector.h.
References folly::detail::rhs.
Referenced by folly::fbvector< HTTPHeaderCode >::swap(), and folly::fbvector< T, Allocator >::Impl::swapData().
void folly::swap | ( | basic_fbstring< E, T, A, S > & | lhs, |
basic_fbstring< E, T, A, S > & | rhs | ||
) |
Definition at line 2719 of file FBString.h.
References folly::basic_fbstring< E, T, A, Storage >::swap().
Referenced by folly::basic_fbstring< E, T, A, Storage >::insertImpl(), folly::basic_fbstring< E, T, A, Storage >::replaceAliased(), and folly::basic_fbstring< E, T, A, Storage >::replaceImpl().
|
noexcept |
|
inlinenoexcept |
decltype(auto) folly::synchronized | ( | Func && | func, |
SynchronizedLockers &&... | lockers | ||
) |
Acquire locks for multiple Synchronized<> objects, in a deadlock-safe manner.
Wrap the synchronized instances with the appropriate locking strategy by using one of the four strategies - folly::lock (exclusive acquire for exclusive only mutexes), folly::rlock (shared acquire for shareable mutexes), folly::wlock (exclusive acquire for shareable mutexes) or folly::ulock (upgrade acquire for upgrade mutexes) (see above)
The locks will be acquired and the passed callable will be invoked with the LockedPtr instances in the order that they were passed to the function
Definition at line 1553 of file Synchronized.h.
References apply(), and lock().
|
noexcept |
terminate_with
Terminates as if by forwarding to throw_exception but in a noexcept context.
Definition at line 45 of file Exception.h.
References throw_exception().
|
noexcept |
terminate_with
Terminates as if by forwarding to throw_exception but in a noexcept context.
Definition at line 91 of file Exception.h.
References folly::detail::to_exception_arg_().
folly::TEST | ( | AsyncTimeout | , |
make | |||
) |
Definition at line 23 of file AsyncTimeoutTest.cpp.
References EXPECT_EQ, folly::EventBase::loop(), folly::AsyncTimeout::make(), folly::pushmi::__adl::noexcept(), and value().
folly::TEST | ( | makeMoveWrapper | , |
Empty | |||
) |
folly::TEST | ( | WriteFlagsTest | , |
isSet | |||
) |
Definition at line 25 of file WriteFlagsTest.cpp.
References ASSERT_FALSE, ASSERT_TRUE, isSet(), and uint32_t.
folly::TEST | ( | Lazy | , |
Simple | |||
) |
folly::TEST | ( | LockFreeRingBuffer | , |
writeReadSequentially | |||
) |
Definition at line 26 of file LockFreeRingBufferTest.cpp.
References ASSERT_EQ, ASSERT_TRUE, folly::LockFreeRingBuffer< T, Atom >::currentHead(), upload::dest, folly::LockFreeRingBuffer< T, Atom >::Cursor::moveForward(), folly::LockFreeRingBuffer< T, Atom >::tryRead(), val, folly::LockFreeRingBuffer< T, Atom >::write(), and fizz::detail::write().
folly::TEST | ( | AsyncTransportTest | , |
getSocketFromSocket | |||
) |
folly::TEST | ( | AsyncSocketTest | , |
getSockOpt | |||
) |
Definition at line 29 of file AsyncSocketTest.cpp.
References EXPECT_EQ, folly::netops::getsockopt(), folly::AsyncSocket::newSocket(), folly::netops::socket(), and val.
folly::TEST | ( | MemoryMapping | , |
Basic | |||
) |
Definition at line 29 of file MemoryMappingTest.cpp.
References folly::MemoryMapping::asRange(), data(), EXPECT_EQ, f, folly::File::fd(), kSomeDouble, m, folly::File::temporary(), and folly::MemoryMapping::writable().
folly::TEST | ( | makeMoveWrapper | , |
NonEmpty | |||
) |
Definition at line 30 of file MoveWrapperTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, makeMoveWrapper(), and folly::gen::move.
folly::TEST | ( | AsyncSocketException | , |
SimpleTest | |||
) |
Definition at line 32 of file AsyncSocketExceptionTest.cpp.
References EXPECT_EQ, folly::AsyncSocketException::getErrno(), folly::AsyncSocketException::getType(), and string.
folly::TEST | ( | AsyncTransportTest | , |
getSocketFromWrappedTransport | |||
) |
Definition at line 33 of file AsyncTransportTest.cpp.
References ASSERT_EQ, EXPECT_CALL, folly::AsyncTransportWrapper::getUnderlyingTransport(), and testing::Return().
folly::TEST | ( | AsyncTimeout | , |
schedule | |||
) |
Definition at line 38 of file AsyncTimeoutTest.cpp.
References EXPECT_EQ, folly::EventBase::loop(), folly::pushmi::__adl::noexcept(), folly::AsyncTimeout::schedule(), and value().
folly::TEST | ( | makeMoveWrapper | , |
rvalue | |||
) |
Definition at line 38 of file MoveWrapperTest.cpp.
References makeMoveWrapper(), and folly::gen::move.
folly::TEST | ( | SSLContextInitializationTest | , |
SSLContextInitializeThenSetLocksAndInit | |||
) |
Definition at line 40 of file SSLContextInitializationTest.cpp.
References folly::ssl::init(), and folly::ssl::setLockTypesAndInit().
folly::TEST | ( | WriteFlagsTest | , |
unionOperator | |||
) |
folly::TEST | ( | ExecutorTest | , |
KeepAliveBasic | |||
) |
Definition at line 42 of file ExecutorTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, folly::Executor::getKeepAliveToken(), and folly::KeepAliveTestExecutor::refCount.
folly::TEST | ( | makeMoveWrapper | , |
lvalue | |||
) |
folly::TEST | ( | AsyncSocketTest | , |
REUSEPORT | |||
) |
Definition at line 43 of file AsyncSocketTest.cpp.
References folly::SocketAddress::getAddress(), folly::SocketAddress::getPort(), INFO, and folly::AsyncServerSocket::newSocket().
folly::TEST | ( | MemoryMapping | , |
Move | |||
) |
Definition at line 47 of file MemoryMappingTest.cpp.
References folly::MemoryMapping::asRange(), folly::MemoryMapping::asWritableRange(), data(), EXPECT_EQ, f, folly::File::fd(), kSomeDouble, m, folly::gen::move, folly::File::temporary(), and folly::MemoryMapping::writable().
folly::TEST | ( | LockFreeRingBuffer | , |
writeReadSequentiallyBackward | |||
) |
last write
Definition at line 47 of file LockFreeRingBufferTest.cpp.
References ASSERT_EQ, ASSERT_TRUE, folly::LockFreeRingBuffer< T, Atom >::currentHead(), folly::LockFreeRingBuffer< T, Atom >::Cursor::moveBackward(), folly::LockFreeRingBuffer< T, Atom >::tryRead(), val, folly::LockFreeRingBuffer< T, Atom >::write(), and fizz::detail::write().
folly::TEST | ( | makeMoveWrapper | , |
lvalue_copyable | |||
) |
folly::TEST | ( | SSLContextInitializationTest | , |
SSLContextSetLocksAndInitialize | |||
) |
Definition at line 49 of file SSLContextInitializationTest.cpp.
References folly::ssl::setLockTypesAndInit().
folly::TEST | ( | WriteFlagsTest | , |
intersectionOperator | |||
) |
folly::TEST | ( | AsyncTimeout | , |
schedule_immediate | |||
) |
Definition at line 53 of file AsyncTimeoutTest.cpp.
References EXPECT_EQ, folly::EventBase::loop(), folly::pushmi::__adl::noexcept(), folly::AsyncTimeout::schedule(), and value().
folly::TEST | ( | ExecutorTest | , |
KeepAliveMove | |||
) |
Definition at line 55 of file ExecutorTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::Executor::getKeepAliveToken(), folly::gen::move, and folly::KeepAliveTestExecutor::refCount.
folly::TEST | ( | Lazy | , |
Global | |||
) |
folly::TEST | ( | SSLContextInitializationTest | , |
SSLContextLocks | |||
) |
Definition at line 58 of file SSLContextInitializationTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, testing::Test::HasFailure(), INFO, folly::ssl::init(), folly::ssl::isLockDisabled(), and setupSSLLocks().
folly::TEST | ( | AsyncSocketException | , |
SSLExceptionType | |||
) |
Definition at line 59 of file AsyncSocketExceptionTest.cpp.
References EXPECT_EQ, folly::AsyncSocketException::getType(), and folly::ssl::init().
folly::TEST | ( | WriteFlagsTest | , |
exclusionOperator | |||
) |
Definition at line 61 of file WriteFlagsTest.cpp.
References ASSERT_FALSE, ASSERT_TRUE, and isSet().
Definition at line 63 of file ExpectedTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, in_place(), makeUnexpected(), and value().
Definition at line 66 of file OptionalTest.cpp.
References folly::Optional< Value >::clear(), folly::Optional< Value >::emplace(), EXPECT_FALSE, EXPECT_TRUE, and x.
folly::TEST | ( | AsyncTimeout | , |
cancel_make | |||
) |
Definition at line 67 of file AsyncTimeoutTest.cpp.
References EXPECT_EQ, EXPECT_NE, folly::EventBase::loop(), folly::AsyncTimeout::make(), folly::pushmi::__adl::noexcept(), folly::RequestContext::saveContext(), and value().
folly::TEST | ( | SequencedExecutor | , |
CPUThreadPoolExecutor | |||
) |
Definition at line 68 of file SequencedExecutorTest.cpp.
References folly::pushmi::executor, and testExecutor().
Referenced by TEST().
folly::TEST | ( | AsyncSocketTest | , |
v4v6samePort | |||
) |
Definition at line 68 of file AsyncSocketTest.cpp.
References addr, ASSERT_GT, EXPECT_EQ, folly::AsyncServerSocket::newSocket(), and uint16_t.
folly::TEST | ( | MemoryMapping | , |
DoublyMapped | |||
) |
Definition at line 68 of file MemoryMappingTest.cpp.
References folly::MemoryMapping::asWritableRange(), b, count, data(), EXPECT_EQ, EXPECT_NE, f, folly::File::fd(), kSomeDouble, string, folly::File::temporary(), folly::MemoryMapping::writable(), and fizz::detail::write().
folly::TEST | ( | LockFreeRingBuffer | , |
readsCanBlock | |||
) |
Definition at line 69 of file LockFreeRingBufferTest.cpp.
References Atom, folly::LockFreeRingBuffer< T, Atom >::currentHead(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, i, val, folly::LockFreeRingBuffer< T, Atom >::waitAndTryRead(), and folly::LockFreeRingBuffer< T, Atom >::write().
folly::TEST | ( | WriteFlagsTest | , |
unsetOperator | |||
) |
Definition at line 71 of file WriteFlagsTest.cpp.
References ASSERT_FALSE, ASSERT_TRUE, and isSet().
folly::TEST | ( | SequencedExecutor | , |
SerialCPUThreadPoolExecutor | |||
) |
Definition at line 73 of file SequencedExecutorTest.cpp.
References folly::SerialExecutor::create(), folly::pushmi::executor, folly::Executor::getKeepAliveToken(), and testExecutor().
folly::TEST | ( | ExecutorTest | , |
KeepAliveConvert | |||
) |
Definition at line 74 of file ExecutorTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::Executor::KeepAlive< ExecutorT >::get(), folly::Executor::getKeepAliveToken(), folly::gen::move, and folly::KeepAliveTestExecutor::refCount.
folly::TEST | ( | Expected | , |
String | |||
) |
Definition at line 75 of file ExpectedTest.cpp.
References folly::Expected< Value, Error >::error(), EXPECT_EQ, EXPECT_FALSE, and EXPECT_TRUE.
Definition at line 75 of file OptionalTest.cpp.
References testing::ElementsAre(), folly::Optional< Value >::emplace(), and EXPECT_THAT.
folly::TEST | ( | SequencedExecutor | , |
EventBase | |||
) |
Definition at line 80 of file SequencedExecutorTest.cpp.
References getEventBase(), and testExecutor().
folly::TEST | ( | AsyncSocketTest | , |
duplicateBind | |||
) |
Definition at line 80 of file AsyncSocketTest.cpp.
References EXPECT_THROW, folly::SocketAddress::getAddress(), folly::SocketAddress::getPort(), and folly::AsyncServerSocket::newSocket().
folly::TEST | ( | SSLContextInitializationTest | , |
SSLContextLocksSetAfterInitIgnored | |||
) |
Definition at line 82 of file SSLContextInitializationTest.cpp.
References EXPECT_TRUE, testing::Test::HasFailure(), INFO, folly::ssl::init(), folly::ssl::isLockDisabled(), folly::ssl::setLockTypes(), and setupSSLLocks().
folly::TEST | ( | Optional | , |
EmplaceInitializerList | |||
) |
Definition at line 83 of file OptionalTest.cpp.
References testing::ElementsAre(), folly::Optional< Value >::emplace(), and EXPECT_THAT.
folly::TEST | ( | WriteFlagsTest | , |
compoundAssignmentUnionOperator | |||
) |
folly::TEST | ( | Expected | , |
Ambiguous | |||
) |
Definition at line 90 of file ExpectedTest.cpp.
References folly::Expected< Value, Error >::emplace(), folly::Expected< Value, Error >::error(), EXPECT_EQ, EXPECT_FALSE, in_place(), makeUnexpected(), folly::gen::move, and value().
folly::TEST | ( | Lazy | , |
NonLambda | |||
) |
Definition at line 90 of file LazyTest.cpp.
References folly::CopyCount::CopyCount(), EXPECT_EQ, f, and lazy().
folly::TEST | ( | Optional | , |
Reset | |||
) |
Definition at line 91 of file OptionalTest.cpp.
References EXPECT_FALSE, and folly::Optional< Value >::reset().
folly::TEST | ( | ExecutorTest | , |
KeepAliveCopy | |||
) |
Definition at line 93 of file ExecutorTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, folly::Executor::getKeepAliveToken(), and folly::KeepAliveTestExecutor::refCount.
folly::TEST | ( | AsyncTimeout | , |
cancel_schedule | |||
) |
Definition at line 93 of file AsyncTimeoutTest.cpp.
References folly::AsyncTimeout::cancelTimeout(), EXPECT_EQ, EXPECT_NE, folly::EventBase::loop(), folly::pushmi::__adl::noexcept(), folly::RequestContext::saveContext(), folly::AsyncTimeout::schedule(), and value().
folly::TEST | ( | AsyncSocketTest | , |
tosReflect | |||
) |
Definition at line 93 of file AsyncSocketTest.cpp.
References ASSERT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::netops::getsockopt(), folly::AsyncServerSocket::newSocket(), TCP_SAVE_SYN, and value().
folly::TEST | ( | Optional | , |
String | |||
) |
folly::TEST | ( | WriteFlagsTest | , |
compoundAssignmentIntersectionOperator | |||
) |
Definition at line 104 of file OptionalTest.cpp.
References folly::Optional< Value >::clear(), folly::Optional< Value >::emplace(), EXPECT_EQ, EXPECT_FALSE, and folly::gen::move.
folly::TEST | ( | Lazy | , |
Consty | |||
) |
folly::TEST | ( | MemoryMapping | , |
Simple | |||
) |
Definition at line 109 of file MemoryMappingTest.cpp.
References folly::MemoryMapping::data(), EXPECT_EQ, f, folly::File::fd(), m, and folly::File::temporary().
folly::TEST | ( | TLRefCount | , |
Basic | |||
) |
Definition at line 116 of file RefCountTest.cpp.
folly::TEST | ( | Expected | , |
Simple | |||
) |
Definition at line 119 of file ExpectedTest.cpp.
References folly::Expected< Value, Error >::emplace(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, makeUnexpected(), and folly::Expected< Value, Error >::value_or().
folly::TEST | ( | TLRefCount | , |
Stress | |||
) |
Definition at line 120 of file RefCountTest.cpp.
folly::TEST | ( | MemoryMapping | , |
LargeFile | |||
) |
Definition at line 123 of file MemoryMappingTest.cpp.
References folly::MemoryMapping::data(), EXPECT_EQ, f, folly::File::fd(), i, m, folly::Random::rand32(), s, size(), string, and folly::File::temporary().
folly::TEST | ( | Optional | , |
Simple | |||
) |
Definition at line 128 of file OptionalTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::gen::move, folly::pushmi::__adl::noexcept(), operator==(), s, s_, and folly::Optional< Value >::value_or().
folly::TEST | ( | LockFreeRingBuffer | , |
writesNeverFail | |||
) |
Definition at line 140 of file LockFreeRingBufferTest.cpp.
folly::TEST | ( | MemoryMapping | , |
ZeroLength | |||
) |
Definition at line 146 of file MemoryMappingTest.cpp.
References folly::MemoryMapping::data(), EXPECT_EQ, EXPECT_TRUE, f, folly::File::fd(), m, folly::MemoryMapping::mlock(), folly::MemoryMapping::mlocked(), folly::MemoryMapping::MUST_LOCK, folly::Range< Iter >::size(), and folly::File::temporary().
folly::TEST | ( | MemoryMapping | , |
Advise | |||
) |
Definition at line 154 of file MemoryMappingTest.cpp.
References folly::MemoryMapping::advise(), f, folly::File::fd(), ftruncateNoInt(), kPageSize, m, size(), and folly::File::temporary().
folly::TEST | ( | Expected | , |
value_or_rvalue_arg | |||
) |
Definition at line 157 of file ExpectedTest.cpp.
References EXPECT_EQ, makeUnexpected(), folly::gen::move, and folly::Expected< Value, Error >::value_or().
folly::TEST | ( | LockFreeRingBuffer | , |
readerCanDetectSkips | |||
) |
Definition at line 160 of file LockFreeRingBufferTest.cpp.
References folly::LockFreeRingBuffer< T, Atom >::currentHead(), folly::LockFreeRingBuffer< T, Atom >::currentTail(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, i, folly::chrono::round(), folly::LockFreeRingBuffer< T, Atom >::tryRead(), val, folly::LockFreeRingBuffer< T, Atom >::waitAndTryRead(), and folly::LockFreeRingBuffer< T, Atom >::write().
folly::TEST | ( | AtomicWait | , |
Basic | |||
) |
Definition at line 160 of file AtomicNotificationTest.cpp.
folly::TEST | ( | AtomicWait | , |
BasicNonStandardWidths | |||
) |
Definition at line 164 of file AtomicNotificationTest.cpp.
folly::TEST | ( | Optional | , |
value_or_rvalue_arg | |||
) |
Definition at line 170 of file OptionalTest.cpp.
References EXPECT_EQ, folly::gen::move, and folly::Optional< Value >::value_or().
folly::TEST | ( | AtomicWait | , |
AtomicWaitUntilTimeout | |||
) |
Definition at line 170 of file AtomicNotificationTest.cpp.
folly::TEST | ( | AtomicWait | , |
AtomicWaitUntilTimeoutNonStandardWidths | |||
) |
Definition at line 174 of file AtomicNotificationTest.cpp.
folly::TEST | ( | AsyncSSLSocketTest2 | , |
AttachDetachSSLContext | |||
) |
Test passing contexts between threads
Definition at line 178 of file AsyncSSLSocketTest2.cpp.
References EXPECT_TRUE, f, folly::TestSSLServer::getAddress(), and folly::gen::move.
folly::TEST | ( | AtomicWait | , |
AtomicWaitUntilNotified | |||
) |
Definition at line 180 of file AtomicNotificationTest.cpp.
folly::TEST | ( | Expected | , |
value_or_noncopyable | |||
) |
Definition at line 183 of file ExpectedTest.cpp.
References EXPECT_EQ, folly::gen::move, and unexpected().
folly::TEST | ( | AtomicWait | , |
AtomicWaitUntilNotifiedNonStandardWidths | |||
) |
Definition at line 184 of file AtomicNotificationTest.cpp.
folly::TEST | ( | LockFreeRingBuffer | , |
currentTailRange | |||
) |
Definition at line 189 of file LockFreeRingBufferTest.cpp.
References folly::LockFreeRingBuffer< T, Atom >::currentTail(), EXPECT_EQ, EXPECT_TRUE, val, and folly::LockFreeRingBuffer< T, Atom >::write().
folly::TEST | ( | AsyncSSLSocketTest | , |
ConnectWriteReadClose | |||
) |
Test connecting to, writing to, reading from, and closing the connection to the SSL server.
Definition at line 189 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, folly::TestSSLServer::getAddress(), folly::netops::socket(), uint32_t, and uint8_t.
folly::TEST | ( | AtomicWait | , |
AtomicWaitAliasing | |||
) |
Definition at line 190 of file AtomicNotificationTest.cpp.
folly::TEST | ( | AtomicWait | , |
AtomicWaitAliasingNonStandardWidths | |||
) |
Definition at line 194 of file AtomicNotificationTest.cpp.
folly::TEST | ( | Optional | , |
value_or_noncopyable | |||
) |
folly::TEST | ( | Expected | , |
value_move | |||
) |
folly::TEST | ( | Expected | , |
dereference_move | |||
) |
folly::TEST | ( | Optional | , |
value_move | |||
) |
Definition at line 211 of file OptionalTest.cpp.
folly::TEST | ( | Expected | , |
EmptyConstruct | |||
) |
Definition at line 211 of file ExpectedTest.cpp.
References folly::Expected< Value, Error >::error(), EXPECT_EQ, EXPECT_FALSE, folly::gen::move, and unexpected().
folly::TEST | ( | Optional | , |
dereference_move | |||
) |
folly::TEST | ( | Expected | , |
Unique | |||
) |
Definition at line 221 of file ExpectedTest.cpp.
References folly::Expected< Value, Error >::emplace(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, makeUnexpected(), and folly::gen::move.
folly::TEST | ( | LockFreeRingBuffer | , |
cursorFromWrites | |||
) |
Definition at line 221 of file LockFreeRingBufferTest.cpp.
References EXPECT_EQ, val, and folly::LockFreeRingBuffer< T, Atom >::writeAndGetCursor().
folly::TEST | ( | Optional | , |
EmptyConstruct | |||
) |
folly::TEST | ( | AsyncSSLSocketTest | , |
ReadAfterClose | |||
) |
Test reading after server close.
Definition at line 229 of file AsyncSSLSocketTest.cpp.
References folly::HandshakeCallback::closeSocket(), EXPECT_EQ, folly::HandshakeCallback::getSocket(), and folly::netops::socket().
folly::TEST | ( | DistributedMutex | , |
InternalDetailTestOne | |||
) |
folly::TEST | ( | Optional | , |
InPlaceConstruct | |||
) |
folly::TEST | ( | LockFreeRingBuffer | , |
moveBackwardsCanFail | |||
) |
Definition at line 238 of file LockFreeRingBufferTest.cpp.
References folly::LockFreeRingBuffer< T, Atom >::currentHead(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, val, and folly::LockFreeRingBuffer< T, Atom >::write().
folly::TEST | ( | DistributedMutex | , |
Basic | |||
) |
Definition at line 239 of file DistributedMutexTest.cpp.
References folly::gen::move, and mutex.
folly::TEST | ( | Optional | , |
InPlaceNestedConstruct | |||
) |
folly::TEST | ( | DistributedMutex | , |
BasicTryLock | |||
) |
Definition at line 245 of file DistributedMutexTest.cpp.
References folly::gen::move, and mutex.
folly::TEST | ( | AsyncSSLSocketTest2 | , |
TestTLS12DefaultClient | |||
) |
Definition at line 245 of file AsyncSSLSocketTest2.cpp.
References EXPECT_TRUE, folly::gen::move, and folly::SSLContext::TLSv1_2.
folly::TEST | ( | Optional | , |
Unique | |||
) |
Definition at line 248 of file OptionalTest.cpp.
References folly::Optional< Value >::clear(), folly::Optional< Value >::emplace(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, and folly::gen::move.
folly::TEST | ( | Expected | , |
Shared | |||
) |
Definition at line 254 of file ExpectedTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, makeUnexpected(), folly::gen::move, ptr, and unexpected().
folly::TEST | ( | DistributedMutex | , |
TestSingleElementContentionChain | |||
) |
Definition at line 257 of file DistributedMutexTest.cpp.
References i, folly::gen::move, and mutex.
folly::TEST | ( | AsyncSSLSocketTest | , |
Renegotiate | |||
) |
Test bad renegotiation
Definition at line 257 of file AsyncSSLSocketTest.cpp.
References ASSERT_TRUE, getctx(), getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, INFO, folly::EventBase::loop(), folly::EventBase::loopForever(), folly::EventBase::loopOnce(), folly::gen::move, folly::RenegotiatingServer::renegotiationError_, folly::netops::socket(), folly::pushmi::detail::t, and folly::EventBase::terminateLoopSoon().
folly::TEST | ( | AsyncSSLSocketTest2 | , |
TestTLS12BadClient | |||
) |
Definition at line 261 of file AsyncSSLSocketTest2.cpp.
References folly::HandshakeCallback::EXPECT_ERROR, EXPECT_FALSE, folly::gen::move, and folly::SSLContext::TLSv1_2.
folly::TEST | ( | Optional | , |
Shared | |||
) |
Definition at line 279 of file OptionalTest.cpp.
References folly::Optional< Value >::clear(), folly::Optional< Value >::emplace(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::gen::move, ptr, and folly::Optional< Value >::value().
folly::TEST | ( | DistributedMutex | , |
TestTwoElementContentionChain | |||
) |
Definition at line 289 of file DistributedMutexTest.cpp.
References i, folly::gen::move, and mutex.
folly::TEST | ( | Expected | , |
Order | |||
) |
Definition at line 289 of file ExpectedTest.cpp.
References E1, EXPECT_EQ, and unexpected().
folly::TEST | ( | AsyncSSLSocketTest | , |
HandshakeError | |||
) |
Negative test for handshakeError().
Definition at line 307 of file AsyncSSLSocketTest.cpp.
References EXPECT_TRUE, folly::TestSSLServer::getAddress(), folly::netops::socket(), uint32_t, and uint8_t.
folly::TEST | ( | Expected | , |
SwapMethod | |||
) |
Definition at line 308 of file ExpectedTest.cpp.
References a, b, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::Expected< Value, Error >::hasValue(), folly::Expected< Value, Error >::swap(), and folly::Expected< Value, Error >::value().
folly::TEST | ( | Optional | , |
Order | |||
) |
folly::TEST | ( | Optional | , |
Swap | |||
) |
Definition at line 332 of file OptionalTest.cpp.
References folly::NoDefault::a, folly::NoDefault::b, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::Optional< Value >::hasValue(), swap(), and folly::Optional< Value >::value().
folly::TEST | ( | Expected | , |
StdSwapFunction | |||
) |
Definition at line 335 of file ExpectedTest.cpp.
References a, b, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::Expected< Value, Error >::hasValue(), folly::f14::swap(), and folly::Expected< Value, Error >::value().
folly::TEST | ( | DistributedMutex | , |
TestTwoContentionChains | |||
) |
Definition at line 337 of file DistributedMutexTest.cpp.
References i, folly::gen::move, and mutex.
folly::TEST | ( | AsyncSSLSocketTest | , |
ReadError | |||
) |
Negative test for readError().
Definition at line 343 of file AsyncSSLSocketTest.cpp.
References folly::TestSSLServer::getAddress(), folly::netops::socket(), and uint8_t.
folly::TEST | ( | Optional | , |
Comparisons | |||
) |
folly::TEST | ( | Expected | , |
FollySwapFunction | |||
) |
Definition at line 362 of file ExpectedTest.cpp.
References a, b, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::Expected< Value, Error >::hasValue(), swap(), and folly::Expected< Value, Error >::value().
folly::TEST | ( | AsyncSSLSocketTest | , |
WriteError | |||
) |
Negative test for writeError().
Definition at line 372 of file AsyncSSLSocketTest.cpp.
References folly::TestSSLServer::getAddress(), folly::netops::socket(), and uint8_t.
folly::TEST | ( | Expected | , |
Comparisons | |||
) |
folly::TEST | ( | DistributedMutex | , |
StressTwoThreads | |||
) |
Definition at line 401 of file DistributedMutexTest.cpp.
folly::TEST | ( | AsyncSSLSocketTest | , |
SocketWithDelay | |||
) |
Test a socket with TCP_NODELAY unset.
Definition at line 401 of file AsyncSSLSocketTest.cpp.
References folly::netops::connect(), EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_TRUE, folly::TestSSLServer::getAddress(), getctx(), getfds(), i, folly::gen::move, folly::netops::socket(), string, testing::TEST_F(), uint32_t, and uint8_t.
folly::TEST | ( | DistributedMutex | , |
StressThreeThreads | |||
) |
Definition at line 404 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressFourThreads | |||
) |
Definition at line 407 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressFiveThreads | |||
) |
Definition at line 410 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressSixThreads | |||
) |
Definition at line 413 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressSevenThreads | |||
) |
Definition at line 416 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressEightThreads | |||
) |
Definition at line 419 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressSixteenThreads | |||
) |
Definition at line 422 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressThirtyTwoThreads | |||
) |
Definition at line 425 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressSixtyFourThreads | |||
) |
Definition at line 428 of file DistributedMutexTest.cpp.
folly::TEST | ( | Optional | , |
HeterogeneousComparisons | |||
) |
Definition at line 430 of file OptionalTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, and uint64_t.
folly::TEST | ( | DistributedMutex | , |
StressHundredThreads | |||
) |
Definition at line 431 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressHardwareConcurrencyThreads | |||
) |
Definition at line 434 of file DistributedMutexTest.cpp.
folly::TEST | ( | Expected | , |
Conversions | |||
) |
Definition at line 437 of file ExpectedTest.cpp.
References b, E1, EXPECT_FALSE, EXPECT_TRUE, unexpected(), and value().
folly::TEST | ( | DistributedMutex | , |
StressTryLock | |||
) |
Definition at line 438 of file DistributedMutexTest.cpp.
References i, folly::gen::move, mutex, threads, and folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | DistributedMutex | , |
DeterministicStressTwoThreads | |||
) |
Definition at line 470 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
DeterministicStressFourThreads | |||
) |
Definition at line 473 of file DistributedMutexTest.cpp.
folly::TEST | ( | Expected | , |
Pointee | |||
) |
Definition at line 474 of file ExpectedTest.cpp.
References E1, EXPECT_FALSE, EXPECT_TRUE, get_pointer(), unexpected(), and x.
folly::TEST | ( | DistributedMutex | , |
DeterministicStressEightThreads | |||
) |
Definition at line 476 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
DeterministicStressSixteenThreads | |||
) |
Definition at line 479 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
DeterministicStressThirtyTwoThreads | |||
) |
Definition at line 482 of file DistributedMutexTest.cpp.
folly::TEST | ( | Expected | , |
MakeOptional | |||
) |
Definition at line 485 of file ExpectedTest.cpp.
References ASSERT_TRUE, EXPECT_EQ, EXPECT_TRUE, folly::gen::move, s, and string.
folly::TEST | ( | DistributedMutex | , |
TimedLockTimeout | |||
) |
Definition at line 486 of file DistributedMutexTest.cpp.
References EXPECT_FALSE, folly::gen::move, mutex, and start.
folly::TEST | ( | Optional | , |
NoneComparisons | |||
) |
folly::TEST | ( | DistributedMutex | , |
TimedLockAcquireAfterUnlock | |||
) |
Definition at line 505 of file DistributedMutexTest.cpp.
References EXPECT_TRUE, folly::gen::move, mutex, and start.
folly::TEST | ( | Expected | , |
SelfAssignment | |||
) |
Definition at line 520 of file ExpectedTest.cpp.
References a, ASSERT_TRUE, b, folly::Expected< Value, Error >::hasValue(), and folly::Expected< Value, Error >::value().
folly::TEST | ( | DistributedMutex | , |
TimedLockAcquireAfterLock | |||
) |
Definition at line 523 of file DistributedMutexTest.cpp.
References EXPECT_TRUE, i, folly::gen::move, mutex, and folly::test::ManualSchedule::setCallback().
folly::TEST | ( | Optional | , |
Conversions | |||
) |
Definition at line 524 of file OptionalTest.cpp.
References folly::NoDefault::b, EXPECT_FALSE, EXPECT_TRUE, and none.
folly::TEST | ( | Expected | , |
AssignmentContained | |||
) |
Test that a class containing an Expected can be copy and move assigned. This was broken under gcc 4.7 until assignment operators were explicitly defined.
Definition at line 555 of file ExpectedTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::ContainsExpected::hasValue(), folly::gen::move, and folly::ContainsExpected::value().
folly::TEST | ( | AsyncSSLSocketTest | , |
SNITestMatch | |||
) |
Definition at line 563 of file AsyncSSLSocketTest.cpp.
References EXPECT_TRUE, getctx(), getfds(), folly::EventBase::loop(), folly::gen::move, folly::SNIClient::serverNameMatch, folly::SNIServer::serverNameMatch, and string.
folly::TEST | ( | DistributedMutex | , |
TimedLockAcquireAfterContentionChain | |||
) |
Definition at line 563 of file DistributedMutexTest.cpp.
References Atom, EXPECT_EQ, EXPECT_TRUE, i, folly::test::DeterministicSchedule::join(), folly::gen::move, mutex, folly::test::ManualSchedule::setCallback(), folly::test::DeterministicSchedule::thread(), and threads.
folly::TEST | ( | Optional | , |
Pointee | |||
) |
Definition at line 565 of file OptionalTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, get_pointer(), none, and x.
folly::TEST | ( | Expected | , |
Exceptions | |||
) |
Definition at line 578 of file ExpectedTest.cpp.
References empty(), EXPECT_THROW, and folly::Expected< Value, Error >::value().
folly::TEST | ( | Expected | , |
NoThrowDefaultConstructible | |||
) |
folly::TEST | ( | AsyncSSLSocketTest | , |
SNITestNotMatch | |||
) |
Definition at line 595 of file AsyncSSLSocketTest.cpp.
References EXPECT_TRUE, getctx(), getfds(), folly::EventBase::loop(), folly::gen::move, folly::SNIClient::serverNameMatch, folly::SNIServer::serverNameMatch, and string.
folly::TEST | ( | Expected | , |
NoThrowMoveConstructible | |||
) |
folly::TEST | ( | Optional | , |
MakeOptional | |||
) |
Definition at line 606 of file OptionalTest.cpp.
References ASSERT_TRUE, EXPECT_EQ, EXPECT_TRUE, make_optional(), folly::gen::move, s, and string.
folly::TEST | ( | Expected | , |
NoThrowMoveAssignable | |||
) |
folly::TEST | ( | AsyncSSLSocketTest | , |
SNITestChangeServerName | |||
) |
Definition at line 631 of file AsyncSSLSocketTest.cpp.
References EXPECT_TRUE, getctx(), getfds(), folly::EventBase::loop(), folly::gen::move, folly::SNIClient::serverNameMatch, and string.
folly::TEST | ( | Expected | , |
NoSelfAssign | |||
) |
Definition at line 637 of file ExpectedTest.cpp.
folly::TEST | ( | Optional | , |
InitializerListConstruct | |||
) |
folly::TEST | ( | Expected | , |
TriviallyDestructible | |||
) |
folly::TEST | ( | DistributedMutex | , |
StressTryLockWithConcurrentLocksTwoThreads | |||
) |
Definition at line 654 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressTryLockWithConcurrentLocksFourThreads | |||
) |
Definition at line 657 of file DistributedMutexTest.cpp.
folly::TEST | ( | Optional | , |
TestDisambiguationMakeOptionalVariants | |||
) |
Definition at line 658 of file OptionalTest.cpp.
References make_optional().
folly::TEST | ( | DistributedMutex | , |
StressTryLockWithConcurrentLocksEightThreads | |||
) |
Definition at line 660 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressTryLockWithConcurrentLocksSixteenThreads | |||
) |
Definition at line 663 of file DistributedMutexTest.cpp.
folly::TEST | ( | AsyncSSLSocketTest | , |
SNITestClientHelloNoHostname | |||
) |
Definition at line 663 of file AsyncSSLSocketTest.cpp.
References EXPECT_TRUE, getctx(), getfds(), folly::EventBase::loop(), folly::gen::move, folly::SNIClient::serverNameMatch, folly::SNIServer::serverNameMatch, and string.
folly::TEST | ( | DistributedMutex | , |
StressTryLockWithConcurrentLocksThirtyTwoThreads | |||
) |
Definition at line 666 of file DistributedMutexTest.cpp.
folly::TEST | ( | Optional | , |
SelfAssignment | |||
) |
Definition at line 669 of file OptionalTest.cpp.
References folly::NoDefault::a, ASSERT_TRUE, folly::NoDefault::b, folly::Optional< Value >::hasValue(), opt_, value(), and folly::Optional< Value >::value().
folly::TEST | ( | DistributedMutex | , |
StressTryLockWithConcurrentLocksSixtyFourThreads | |||
) |
Definition at line 669 of file DistributedMutexTest.cpp.
folly::TEST | ( | Expected | , |
TriviallyCopyable | |||
) |
Definition at line 672 of file ExpectedTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, and value().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockWithLocksTwoThreads | |||
) |
Definition at line 673 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockWithFourThreads | |||
) |
Definition at line 683 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | Expected | , |
Then | |||
) |
Definition at line 687 of file ExpectedTest.cpp.
References ADD_FAILURE, E1, folly::Expected< Value, Error >::error(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, i, in_place(), and unexpected().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockWithLocksEightThreads | |||
) |
Definition at line 693 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLClientTest | |||
) |
Test SSL client socket
Definition at line 697 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, and folly::TestSSLServer::getAddress().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockWithLocksSixteenThreads | |||
) |
Definition at line 703 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | Optional | , |
AssignmentContained | |||
) |
Test that a class containing an Optional can be copy and move assigned. This was broken under gcc 4.7 until assignment operators were explicitly defined.
Definition at line 708 of file OptionalTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, and folly::gen::move.
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockWithLocksThirtyTwoThreads | |||
) |
Definition at line 713 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLClientTestReuse | |||
) |
Test SSL client socket session re-use
Definition at line 722 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, and folly::TestSSLServer::getAddress().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockWithLocksSixtyFourThreads | |||
) |
Definition at line 723 of file DistributedMutexTest.cpp.
References Atom, EXPECT_EQ, i, folly::test::DeterministicSchedule::join(), folly::gen::move, mutex, folly::test::DeterministicSchedule::thread(), threads, and folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | Optional | , |
Exceptions | |||
) |
Definition at line 731 of file OptionalTest.cpp.
References empty(), EXPECT_THROW, and folly::Optional< Value >::value().
folly::TEST | ( | Optional | , |
NoThrowDefaultConstructible | |||
) |
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLClientTimeoutTest | |||
) |
Test SSL client socket timeout
Definition at line 748 of file AsyncSSLSocketTest.cpp.
References folly::HandshakeCallback::closeSocket(), EXPECT_EQ, folly::TestSSLServer::getAddress(), folly::TestSSLAsyncCacheServer::getAsyncCallbacks(), folly::TestSSLAsyncCacheServer::getAsyncLookups(), folly::TestSSLServer::getEventBase(), folly::EventBase::loop(), folly::EventBase::runInEventBaseThread(), folly::ReadCallbackBase::state, STATE_WAITING, folly::EmptyReadCallback::tcpSocket_, testing::TEST(), and folly::HandshakeCallback::waitForHandshake().
folly::TEST | ( | Optional | , |
TriviallyDestructible | |||
) |
folly::TEST | ( | DistributedMutex | , |
StressTryLockWithTwoThreads | |||
) |
Definition at line 758 of file DistributedMutexTest.cpp.
Definition at line 758 of file OptionalTest.cpp.
folly::TEST | ( | Expected | , |
ThenOrThrow | |||
) |
Definition at line 759 of file ExpectedTest.cpp.
References E1, EXPECT_EQ, EXPECT_THROW, in_place(), and unexpected().
folly::TEST | ( | DistributedMutex | , |
StressTryLockFourThreads | |||
) |
Definition at line 761 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressTryLockEightThreads | |||
) |
Definition at line 764 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressTryLockSixteenThreads | |||
) |
Definition at line 767 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressTryLockThirtyTwoThreads | |||
) |
Definition at line 770 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
StressTryLockSixtyFourThreads | |||
) |
Definition at line 773 of file DistributedMutexTest.cpp.
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockTwoThreads | |||
) |
Definition at line 777 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | Optional | , |
ConstMember | |||
) |
Definition at line 780 of file OptionalTest.cpp.
References EXPECT_EQ, and sum().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockFourThreads | |||
) |
Definition at line 787 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockEightThreads | |||
) |
Definition at line 797 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | Optional | , |
NoneMatchesNullopt | |||
) |
Definition at line 801 of file OptionalTest.cpp.
References EXPECT_FALSE, and none.
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockSixteenThreads | |||
) |
Definition at line 807 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockThirtyTwoThreads | |||
) |
Definition at line 817 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | DistributedMutex | , |
DeterministicTryLockSixtyFourThreads | |||
) |
Definition at line 827 of file DistributedMutexTest.cpp.
References folly::test::DeterministicSchedule::uniform().
folly::TEST | ( | FollyLockTest | , |
TestVariadicLockWithSynchronized | |||
) |
Definition at line 884 of file SynchronizedTest.cpp.
References EXPECT_TRUE, lock(), folly::ssl::detail::locks(), rlock(), and wlock().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLParseClientHelloSuccess | |||
) |
Verify Client Ciphers obtained using SSL MSG Callback.
Definition at line 901 of file AsyncSSLSocketTest.cpp.
References folly::SSLHandshakeServerParseClientHello::chosenCipher_, folly::SSLHandshakeServerParseClientHello::clientCiphers_, EXPECT_EQ, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeVerify_, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | FollyLockTest | , |
TestVariadicLockWithArbitraryLockables | |||
) |
Definition at line 904 of file SynchronizedTest.cpp.
References EXPECT_TRUE, and lock().
folly::TEST | ( | FollyLockTest | , |
TestVariadicLockSmartAndPoliteAlgorithm | |||
) |
Definition at line 915 of file SynchronizedTest.cpp.
References EXPECT_EQ, lock(), and makeGuard().
folly::TEST | ( | AsyncSSLSocketTest | , |
GetClientCertificate | |||
) |
Verify that server is able to get client cert by getPeerCert() API.
Definition at line 948 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeSuccess_, kClientTestCA, kClientTestCert, kClientTestKey, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | SynchronizedAlgorithmTest | , |
Basic | |||
) |
Definition at line 983 of file SynchronizedTest.cpp.
References EXPECT_EQ, s, value(), and wlock().
folly::TEST | ( | SynchronizedAlgorithmTest | , |
BasicNonShareableMutex | |||
) |
Definition at line 989 of file SynchronizedTest.cpp.
References EXPECT_EQ, lock(), s, and value().
folly::TEST | ( | Synchronized | , |
SynchronizedFunctionNonConst | |||
) |
Definition at line 995 of file SynchronizedTest.cpp.
References EXPECT_EQ, std::tr1::make_tuple(), and wlock().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLParseClientHelloOnePacket | |||
) |
Definition at line 998 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, getfds(), SCOPE_EXIT, uint16_t, uint32_t, uint8_t, and folly::io::detail::Writable< Derived >::write().
folly::TEST | ( | Synchronized | , |
SynchronizedFunctionConst | |||
) |
Definition at line 1008 of file SynchronizedTest.cpp.
References EXPECT_EQ, std::tr1::make_tuple(), and rlock().
folly::TEST | ( | Synchronized | , |
SynchronizedFunctionManyObjects | |||
) |
Definition at line 1021 of file SynchronizedTest.cpp.
References EXPECT_TRUE, fail(), std::tr1::make_tuple(), rlock(), and wlock().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLParseClientHelloTwoPackets | |||
) |
Definition at line 1040 of file AsyncSSLSocketTest.cpp.
References folly::IOBuf::copyBuffer(), EXPECT_EQ, EXPECT_TRUE, getfds(), SCOPE_EXIT, uint16_t, uint32_t, uint8_t, and folly::io::detail::Writable< Derived >::write().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLParseClientHelloMultiplePackets | |||
) |
Definition at line 1099 of file AsyncSSLSocketTest.cpp.
References folly::IOBuf::copyBuffer(), EXPECT_EQ, EXPECT_TRUE, getfds(), i, min, SCOPE_EXIT, uint16_t, uint32_t, uint8_t, and folly::io::detail::Writable< Derived >::write().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLHandshakeValidationSuccess | |||
) |
Verify sucessful behavior of SSL certificate validation.
Definition at line 1154 of file AsyncSSLSocketTest.cpp.
References EXPECT_LE, EXPECT_TRUE, getctx(), getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, kTestCA, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLHandshakeValidationFailure | |||
) |
Verify that the client's verification callback is able to fail SSL connection establishment.
Definition at line 1192 of file AsyncSSLSocketTest.cpp.
References EXPECT_LE, EXPECT_TRUE, getctx(), getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, kTestCA, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
OverrideSSLCtxDisableVerify | |||
) |
Verify that the options in SSLContext can be overridden in sslConnect/Accept.i.e specifying that no validation should be performed allows an otherwise-invalid certificate to be accepted and doesn't fire the validation callback.
Definition at line 1232 of file AsyncSSLSocketTest.cpp.
References EXPECT_LE, EXPECT_TRUE, getctx(), getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, kTestCA, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
OverrideSSLCtxEnableVerify | |||
) |
Verify that the options in SSLContext can be overridden in sslConnect/Accept. Enable verification even if context says otherwise. Test requireClientCert with client cert
Definition at line 1271 of file AsyncSSLSocketTest.cpp.
References EXPECT_FALSE, EXPECT_LE, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLHandshakeValidationOverride | |||
) |
Verify that the client's verification callback is able to override the preverification failure and allow a successful connection.
Definition at line 1315 of file AsyncSSLSocketTest.cpp.
References EXPECT_LE, EXPECT_TRUE, getctx(), getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLHandshakeValidationSkip | |||
) |
Verify that specifying that no validation should be performed allows an otherwise-invalid certificate to be accepted and doesn't fire the validation callback.
Definition at line 1352 of file AsyncSSLSocketTest.cpp.
References EXPECT_LE, EXPECT_TRUE, getctx(), getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
ClientCertHandshakeSuccess | |||
) |
Test requireClientCert with client cert
Definition at line 1387 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_LE, EXPECT_NE, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
NoClientCertHandshakeError | |||
) |
Test requireClientCert with no client cert
Definition at line 1448 of file AsyncSSLSocketTest.cpp.
References folly::AsyncSSLSocket::closeNow(), EXPECT_FALSE, EXPECT_LE, EXPECT_TRUE, folly::pushmi::operators::from, folly::ScopedEventBaseThread::getEventBase(), getfds(), getFileAsBuf(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, folly::SSLHandshakeBase::handshakeVerify_, INFO, kClientTestKey, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), folly::gen::move, folly::AsyncPipeWriter::newWriter(), pipe(), ptr, folly::EventBase::runInEventBaseThread(), folly::netops::socket(), testing::TEST(), to(), and uint8_t.
folly::TEST | ( | AsyncSSLSocketTest | , |
LoadCertFromMemory | |||
) |
Test OpenSSL 1.1.0's async functionality
Definition at line 1787 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, getFileAsBuf(), kTestCA, kTestCert, and kTestKey.
folly::TEST | ( | AsyncSSLSocketTest | , |
MinWriteSizeTest | |||
) |
Definition at line 1829 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, and folly::netops::socket().
folly::TEST | ( | AsyncSSLSocketTest | , |
UnencryptedTest | |||
) |
Test a full unencrypted codepath
Definition at line 1873 of file AsyncSSLSocketTest.cpp.
References folly::ReadCallback::buffers, c, EXPECT_EQ, EXPECT_NE, getctx(), getfds(), folly::EventBase::loop(), folly::netops::recv(), folly::ReadCallbackBase::setSocket(), and uint8_t.
folly::TEST | ( | AsyncSSLSocketTest | , |
ConnectUnencryptedTest | |||
) |
Definition at line 1925 of file AsyncSSLSocketTest.cpp.
References EXPECT_EQ, folly::TestSSLServer::getAddress(), getctx(), folly::EventBase::loop(), and folly::netops::socket().
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLAcceptRunnerBasic | |||
) |
Test acceptrunner in various situations
Definition at line 1959 of file AsyncSSLSocketTest.cpp.
References EXPECT_FALSE, EXPECT_LE, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, folly::SSLHandshakeBase::handshakeTime, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLAcceptRunnerAcceptError | |||
) |
Definition at line 1994 of file AsyncSSLSocketTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLAcceptRunnerAcceptClose | |||
) |
Definition at line 2028 of file AsyncSSLSocketTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
SSLAcceptRunnerAcceptDestroy | |||
) |
Definition at line 2062 of file AsyncSSLSocketTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, kTestCA, kTestCert, kTestKey, folly::EventBase::loop(), and folly::gen::move.
folly::TEST | ( | AsyncSSLSocketTest | , |
ConnResetErrorString | |||
) |
Definition at line 2096 of file AsyncSSLSocketTest.cpp.
References folly::HandshakeCallback::errorString_, EXPECT_NE, folly::TestSSLServer::getAddress(), folly::netops::socket(), uint8_t, and folly::HandshakeCallback::waitForHandshake().
folly::TEST | ( | AsyncSSLSocketTest | , |
ConnEOFErrorString | |||
) |
Definition at line 2117 of file AsyncSSLSocketTest.cpp.
References folly::HandshakeCallback::errorString_, EXPECT_NE, folly::TestSSLServer::getAddress(), folly::netops::socket(), uint8_t, and folly::HandshakeCallback::waitForHandshake().
folly::TEST | ( | AsyncSSLSocketTest | , |
ConnOpenSSLErrorString | |||
) |
Definition at line 2142 of file AsyncSSLSocketTest.cpp.
References folly::HandshakeCallback::errorString_, EXPECT_NE, folly::TestSSLServer::getAddress(), folly::netops::socket(), uint8_t, and folly::HandshakeCallback::waitForHandshake().
folly::TEST | ( | AsyncSSLSocketTest | , |
TestSSLCipherCodeToNameMap | |||
) |
Definition at line 2176 of file AsyncSSLSocketTest.cpp.
References testing::_, addr, ASSERT_EQ, testing::AtMost(), checkUnixError(), BlockingSocket::close(), folly::netops::connect(), folly::pushmi::operators::error(), EXPECT_CALL, EXPECT_EQ, EXPECT_THAT, EXPECT_THROW, EXPECT_TRUE, folly::TestSSLServer::getAddress(), folly::SocketAddress::getAddress(), getctx(), getfds(), folly::SSLHandshakeBase::handshakeError_, folly::SSLHandshakeBase::handshakeSuccess_, testing::HasSubstr(), INFO, testing::Invoke(), folly::EventBase::loop(), folly::EventBase::loopOnce(), MOCK_METHOD3, folly::gen::move, folly::pushmi::__adl::noexcept(), BlockingSocket::readAll(), folly::netops::recv(), folly::SendMsgDataCallback::resetData(), folly::SendMsgFlagsCallback::resetFlags(), folly::EventBase::runInEventBaseThread(), folly::netops::socket(), ConnCallback::state, string, SUCCESS, testing::TEST(), uint32_t, uint8_t, and BlockingSocket::write().
folly::TEST_F | ( | SSLOptionsTest | , |
TestSetCommonCipherList | |||
) |
Definition at line 29 of file SSLOptionsTest.cpp.
References ASSERT_EQ, ASSERT_STREQ, cipher, folly::SSLContext::createSSL(), and i.
folly::TEST_F | ( | SSLContextTest | , |
TestSetCipherString | |||
) |
Definition at line 42 of file SSLContextTest.cpp.
folly::TEST_F | ( | SSLContextTest | , |
TestSetCipherList | |||
) |
Definition at line 47 of file SSLContextTest.cpp.
folly::TEST_F | ( | SSLContextTest | , |
TestLoadCertKey | |||
) |
Definition at line 53 of file SSLContextTest.cpp.
References EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, folly::SSLContext::isCertKeyPairValid(), folly::SSLContext::loadCertificate(), folly::SSLContext::loadCertificateFromBufferPEM(), folly::SSLContext::loadCertKeyPairFromBufferPEM(), folly::SSLContext::loadCertKeyPairFromFiles(), folly::SSLContext::loadPrivateKey(), folly::SSLContext::loadPrivateKeyFromBufferPEM(), readFile(), SCOPED_TRACE, and string.
folly::TEST_F | ( | SSLSessionTest | , |
BasicTest | |||
) |
Definition at line 84 of file SSLSessionTest.cpp.
References ASSERT_NE, ASSERT_TRUE, getfds(), folly::ssl::SSLSession::getRawSSLSessionDangerous(), folly::SSLHandshakeBase::handshakeSuccess_, and folly::gen::move.
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_coalescing1 | |||
) |
Definition at line 120 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, sock_, and uint32_t.
folly::TEST_F | ( | SSLSessionTest | , |
SerializeDeserializeTest | |||
) |
Definition at line 124 of file SSLSessionTest.cpp.
References ASSERT_NE, ASSERT_TRUE, getfds(), folly::ssl::SSLSession::getRawSSLSessionDangerous(), folly::SSLHandshakeBase::handshakeSuccess_, folly::gen::move, folly::ssl::SSLSession::serialize(), and string.
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_coalescing2 | |||
) |
Definition at line 137 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, sock_, and uint32_t.
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_coalescing3 | |||
) |
Definition at line 162 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, sock_, and uint32_t.
folly::TEST_F | ( | AtomicFetchSetTest | , |
Basic | |||
) |
Definition at line 164 of file AtomicUtilTest.cpp.
folly::TEST_F | ( | SSLSessionTest | , |
GetSessionID | |||
) |
Definition at line 170 of file SSLSessionTest.cpp.
References ASSERT_GE, ASSERT_NE, ASSERT_TRUE, getfds(), folly::ssl::SSLSession::getSessionID(), folly::SSLHandshakeBase::handshakeSuccess_, and folly::gen::move.
folly::TEST_F | ( | AtomicFetchResetTest | , |
Basic | |||
) |
Definition at line 171 of file AtomicUtilTest.cpp.
folly::TEST_F | ( | AtomicFetchSetTest | , |
EnsureFetchOrUsed | |||
) |
Definition at line 178 of file AtomicUtilTest.cpp.
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_coalescing4 | |||
) |
Definition at line 182 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, sock_, and uint32_t.
folly::TEST_F | ( | AtomicFetchResetTest | , |
EnsureFetchAndUsed | |||
) |
Definition at line 185 of file AtomicUtilTest.cpp.
folly::TEST_F | ( | AtomicFetchSetTest | , |
FetchSetDefault | |||
) |
Definition at line 192 of file AtomicUtilTest.cpp.
References folly::detail::atomic_fetch_set_default().
folly::TEST_F | ( | AtomicFetchSetTest | , |
FetchResetDefault | |||
) |
Definition at line 208 of file AtomicUtilTest.cpp.
References folly::detail::atomic_fetch_reset_default().
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_coalescing5 | |||
) |
Definition at line 216 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, sock_, and uint32_t.
folly::TEST_F | ( | AtomicFetchSetTest | , |
FetchSetX86 | |||
) |
Definition at line 225 of file AtomicUtilTest.cpp.
References folly::detail::atomic_fetch_set_x86(), and kIsArchAmd64.
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_coalescing6 | |||
) |
Definition at line 241 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, sock_, and uint32_t.
folly::TEST_F | ( | AtomicFetchResetTest | , |
FetchResetX86 | |||
) |
Definition at line 243 of file AtomicUtilTest.cpp.
References folly::detail::atomic_fetch_reset_x86(), and kIsArchAmd64.
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_with_eor1 | |||
) |
Definition at line 275 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, testing::Invoke(), m, testing::Return(), sock_, and uint32_t.
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_with_eor2 | |||
) |
Definition at line 321 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, testing::Return(), sock_, and uint32_t.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestCopyConstructibleValues | |||
) |
Definition at line 362 of file SynchronizedTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, and value().
folly::TEST_F | ( | AsyncSSLSocketWriteTest | , |
write_with_eor3 | |||
) |
Definition at line 366 of file AsyncSSLSocketWriteTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), m, testing::Return(), sock_, and uint32_t.
folly::TEST_F | ( | SynchronizedLockTest | , |
UpgradableLocking | |||
) |
Definition at line 378 of file SynchronizedTest.cpp.
References EXPECT_EQ, folly::FakeAllPowerfulAssertingMutexInternal::lock_state, folly::FakeAllPowerfulAssertingMutexInternal::SHARED, type, ulock(), folly::FakeAllPowerfulAssertingMutexInternal::UNIQUE, folly::FakeAllPowerfulAssertingMutexInternal::UNLOCKED, folly::FakeAllPowerfulAssertingMutexInternal::UPGRADE, value(), and wlock().
folly::TEST_F | ( | SynchronizedLockTest | , |
UpgradableLockingWithULock | |||
) |
Definition at line 459 of file SynchronizedTest.cpp.
References EXPECT_EQ, folly::FakeAllPowerfulAssertingMutexInternal::lock_state, folly::FakeAllPowerfulAssertingMutexInternal::SHARED, type, ulock(), folly::FakeAllPowerfulAssertingMutexInternal::UNIQUE, folly::FakeAllPowerfulAssertingMutexInternal::UNLOCKED, folly::FakeAllPowerfulAssertingMutexInternal::UPGRADE, value(), and wlock().
folly::TEST_F | ( | SynchronizedLockTest | , |
TestPieceWiseConstruct | |||
) |
Definition at line 544 of file SynchronizedTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, kShouldSucceed, lock(), folly::gen::move, onLock, onUnlock, and folly::NonDefaultConstructibleMutex::value.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestTryLock | |||
) |
Definition at line 750 of file SynchronizedTest.cpp.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestTryWLock | |||
) |
Definition at line 755 of file SynchronizedTest.cpp.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestTryRLock | |||
) |
Definition at line 760 of file SynchronizedTest.cpp.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestTryULock | |||
) |
Definition at line 765 of file SynchronizedTest.cpp.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestLockedPtrCompatibilityExclusive | |||
) |
Definition at line 856 of file SynchronizedTest.cpp.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestLockedPtrCompatibilityShared | |||
) |
Definition at line 861 of file SynchronizedTest.cpp.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestLockedPtrCompatibilityUpgrade | |||
) |
Definition at line 866 of file SynchronizedTest.cpp.
folly::TEST_F | ( | SynchronizedLockTest | , |
TestConvertTryLockToLock | |||
) |
Definition at line 871 of file SynchronizedTest.cpp.
References EXPECT_EQ, ulock(), value(), and wlock().
void folly::testExecutor | ( | folly::Executor & | executor | ) |
Definition at line 60 of file SequencedExecutorTest.cpp.
References EXPECT_FALSE, and isSequencedExecutor().
Referenced by TEST().
void folly::testExecutor | ( | folly::SequencedExecutor & | executor | ) |
Definition at line 64 of file SequencedExecutorTest.cpp.
References EXPECT_TRUE, and isSequencedExecutor().
FOLLY_NOINLINE FOLLY_COLD void folly::throw_exception | ( | Ex && | ex | ) |
throw_exception
Throw an exception if exceptions are enabled, or terminate if compiled with -fno-exceptions.
Definition at line 32 of file Exception.h.
Referenced by folly::Arena< Alloc >::allocateSlow(), folly::Arena< SysAllocator< void > >::Arena(), folly::detail::enforceWhitespace(), folly::exception_wrapper::exception_wrapper(), terminate_with(), folly::detail::terminate_with_(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::thenOrThrow_(), folly::detail::throw_exception_(), and to().
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void folly::throw_exception | ( | Args &&... | args | ) |
throw_exception
Construct and throw an exception if exceptions are enabled, or terminate if compiled with -fno-exceptions.
Converts any arguments of type char const[N]
to char const*
.
Definition at line 80 of file Exception.h.
References testing::Args(), FOLLY_ALWAYS_INLINE, FOLLY_ATTR_VISIBILITY_HIDDEN, and folly::detail::to_exception_arg_().
void folly::throwSystemError | ( | Args &&... | args | ) |
Definition at line 76 of file Exception.h.
References testing::Args(), and throwSystemErrorExplicit().
Referenced by folly::AsyncServerSocket::bind(), folly::AsyncServerSocket::bindSocket(), checkFopenError(), checkUnixError(), folly::File::close(), folly::AsyncServerSocket::createSocket(), folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::ensureSignalLocked(), folly::EventBase::EventBase(), folly::File::File(), folly::AsyncServerSocket::listen(), folly::EventBase::loopForever(), folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::NotificationQueue(), folly::symbolizer::ElfFile::open(), folly::test::WriteFileAtomic::readData(), folly::TimeoutManager::runAfterDelay(), folly::SocketAddress::setFromSocket(), folly::AsyncServerSocket::setReusePortEnabled(), folly::AsyncServerSocket::setTosReflect(), folly::AsyncServerSocket::setupSocket(), folly::test::TEST(), TEST(), and writeTo().
|
inline |
Definition at line 65 of file Exception.h.
References testing::Args(), and makeSystemErrorExplicit().
Referenced by checkFopenErrorExplicit(), checkKernelError(), checkPosixError(), checkUnixErrorExplicit(), folly::AsyncIO::submit(), folly::test::TEST(), and throwSystemError().
void folly::throwSystemErrorExplicit | ( | int | err, |
Args &&... | args | ||
) |
Definition at line 70 of file Exception.h.
References testing::Args(), and makeSystemErrorExplicit().
Repeat the given future (i.e., the computation it contains) n times.
thunk behaves like std::function<Future<T2>(void)>
Definition at line 2348 of file Future-inl.h.
References count, make_unique(), and whileDo().
Referenced by addBenchmark(), folly::MultiLevelTimeSeries< VT, CT >::count(), HTTPDownstreamTest< SPDY3_1CodecPair >::expectResponses(), ExpensiveCopy::ExpensiveCopy(), folly::Future< folly::folly::Unit >::Future(), folly::TimeseriesHistogram< T, CT, C >::rate(), TEST(), and TEST_F().
std::enable_if< std::is_arithmetic<Src>::value && !std::is_same<Tgt, Src>::value && std::is_same<Tgt, bool>::value, Tgt>::type folly::to | ( | const Src & | value | ) |
Definition at line 181 of file Conv.h.
References folly::pushmi::operators::get, folly::detail::getLastElement(), size(), and type.
std::enable_if<detail::is_chrono_conversion<Tgt, Src>::value, Tgt>:: type folly::to | ( | const Src & | value | ) |
For all chrono conversions, to() wraps tryTo()
Definition at line 677 of file Conv.h.
References makeConversionError(), and value().
Referenced by testing::internal::ArrayAwareFind(), cmake_minimum_required(), folly::test::TupleTo2< TemplateSeq< std::size_t, Ns... > >::convert(), folly::observer_detail::GraphCycleDetector< NodeId >::dfs(), testing::internal::DownCast_(), getExceptionStackTraceStack(), testing::internal::WhenDynamicCastToMatcher< To >::MatchAndExplain(), testing::internal::WhenDynamicCastToMatcher< To & >::MatchAndExplain(), option(), folly::netops::sendto(), TEST(), testing::internal::TEST(), TEST(), testing::internal::To::To(), toAppendStrImpl(), and fizz::sm::EventHandlerBase< SM, state, event >::Transition().
folly::std enable_if::typetoAppendDelimStrImpl const Delimiter, const Tv, Tgtresult bool Tgt ::type folly::to | ( | const char * | b, |
const char * | e | ||
) |
Definition at line 1163 of file Conv.h.
References b, FOLLY_NODISCARD, makeConversionError(), type, and value.
std::enable_if<detail::IsArithToArith<Tgt, Src>::value, Tgt>::type folly::to | ( | const Src & | value | ) |
Definition at line 1361 of file Conv.h.
References FOLLY_NODISCARD, makeConversionError(), type, value, and value().
|
inline |
|
inline |
Definition at line 1498 of file Conv.h.
References makeConversionError(), folly::gen::move, folly::detail::parseToWrap(), throw_exception(), and type.
Tgt folly::to | ( | StringPiece * | src | ) |
Definition at line 1532 of file Conv.h.
References makeConversionError(), folly::gen::move, parseTo(), type, and value.
std::enable_if< std::is_enum<Src>::value && !std::is_same<Src, Tgt>::value && !std::is_convertible<Tgt, StringPiece>::value, Tgt>::type folly::to | ( | const Src & | value | ) |
std::enable_if< !std::is_convertible<Src, StringPiece>::value && std::is_enum<Tgt>::value && !std::is_same<Src, Tgt>::value, Tgt>::type folly::to | ( | const Src & | value | ) |
Definition at line 24 of file Ordering.h.
References T.
Referenced by folly::IOBufCompare::impl(), and TEST_F().
std::shared_ptr<T> folly::to_shared_ptr | ( | std::unique_ptr< T, D > && | ptr | ) |
to_shared_ptr
Convert unique_ptr to shared_ptr without specifying the template type parameter and letting the compiler deduce it.
So you can write this:
auto sptr = to_shared_ptr(getSomethingUnique<T>());
Instead of this:
auto sptr = shared_ptr<T>(getSomethingUnique<T>());
Useful when T
is long, such as:
using T = foobar::FooBarAsyncClient;
Definition at line 323 of file Memory.h.
References folly::gen::move.
Referenced by TEST().
constexpr auto folly::to_signed | ( | T const & | t | ) | -> typename std::make_signed<T>::type |
Definition at line 389 of file Utility.h.
References max, folly::pushmi::detail::t, and type.
Referenced by folly::detail::bits_to_signed(), folly::detail::CheckOverflowToDuration< IsFloatingPoint >::check(), and TEST_F().
constexpr auto folly::to_unsigned | ( | T const & | t | ) | -> typename std::make_unsigned<T>::type |
Definition at line 399 of file Utility.h.
References folly::pushmi::detail::t, and type.
Referenced by folly::Histogram< T >::addRepeatedValue(), folly::Histogram< T >::addValue(), folly::detail::bits_to_signed(), folly::detail::bits_to_unsigned(), folly::detail::CheckOverflowToDuration< IsFloatingPoint >::check(), folly::detail::integral_hasher< signed long long >::operator()(), folly::Histogram< T >::removeValue(), and TEST_F().
to_weak_ptr
Make a weak_ptr and return it from a shared_ptr without specifying the template type parameter and letting the compiler deduce it.
So you can write this:
auto wptr = to_weak_ptr(getSomethingShared<T>());
Instead of this:
auto wptr = weak_ptr<T>(getSomethingShared<T>());
Useful when T
is long, such as:
using T = foobar::FooBarAsyncClient;
Definition at line 346 of file Memory.h.
References ptr.
Referenced by TEST(), and folly::futures::detail::FutureBase< T >::withinImplementation().
void folly::toAppend | ( | IPAddressV4 | addr, |
string * | result | ||
) |
void folly::toAppend | ( | IPAddress | addr, |
string * | result | ||
) |
Definition at line 41 of file IPAddress.cpp.
void folly::toAppend | ( | IPAddressV4 | addr, |
fbstring * | result | ||
) |
Definition at line 43 of file IPAddressV4.cpp.
References folly::basic_fbstring< E, T, A, Storage >::append(), and folly::IPAddressV4::str().
void folly::toAppend | ( | IPAddress | addr, |
fbstring * | result | ||
) |
Definition at line 44 of file IPAddress.cpp.
References addr, folly::basic_fbstring< E, T, A, Storage >::append(), folly::Range< Iter >::begin(), CIDR_MISMATCH, folly::Range< Iter >::data(), folly::detail::familyNameStr(), folly::Range< Iter >::find(), folly::IPAddressV4::fromBinary(), folly::IPAddressV6::fromBinary(), folly::IPAddressV4::fromLong(), folly::IPAddressV4::fromLongHBO(), folly::IPAddressV6::getIPv4For6To4(), folly::IPAddressV4::inSubnet(), folly::IPAddressV4::inSubnetWithMask(), INVALID_CIDR, INVALID_DEFAULT_CIDR, INVALID_IP, INVALID_IP_SLASH_CIDR, folly::IPAddressV6::is6To4(), makeUnexpected(), max, folly::gen::move, folly::pushmi::__adl::noexcept(), sformat(), folly::Range< Iter >::size(), split(), string, folly::detail::Bytes::toHex(), folly::IPAddressV4::tryFromBinary(), folly::IPAddressV6::tryFromBinary(), folly::IPAddressV4::tryFromString(), folly::IPAddressV6::tryFromString(), uint32_t, uint8_t, UNSUPPORTED_ADDR_FAMILY, folly::IPAddressV4::validate(), folly::IPAddressV6::validate(), and value().
void folly::toAppend | ( | IPAddressV6 | addr, |
string * | result | ||
) |
void folly::toAppend | ( | IPAddressV6 | addr, |
fbstring * | result | ||
) |
Definition at line 61 of file IPAddressV6.cpp.
References folly::basic_fbstring< E, T, A, Storage >::append(), and folly::IPAddressV6::str().
std::enable_if<IsSomeString<Tgt>::value>::type folly::toAppend | ( | MacAddress | address, |
Tgt * | result | ||
) |
Definition at line 225 of file MacAddress.h.
References operator<<(), toAppend(), and folly::MacAddress::toString().
void folly::toAppend | ( | char | value, |
Tgt * | result | ||
) |
A single char gets appended.
Definition at line 406 of file Conv.h.
References type, value, and value().
Referenced by folly::IPAddressV4::AddressStorage::AddressStorage(), folly::Uri::authority(), BENCHMARK_RELATIVE(), folly::gen::detail::UnsplitBuffer< Delimiter, OutputBuffer >::compose(), proxygen::HTTPMessage::createUrl(), folly::Histogram< T >::debugString(), estimateSpaceNeeded(), folly::detail::fallbackFormatOneArg(), folly::TimeseriesHistogram< T, CT, C >::getString(), proxygen::ParseURL::hostAndPort(), folly::detail::internalJoinAppend(), folly::test::detail::CheckResult::operator<<(), toAppend(), my::toAppend(), toAppendStrImpl(), and folly::Uri::toString().
std::enable_if< std::is_convertible<Src, const char*>::value && IsSomeString<Tgt>::value>::type folly::toAppend | ( | Src | value, |
Tgt * | result | ||
) |
std::enable_if< IsSomeString<Src>::value && IsSomeString<Tgt>::value>::type folly::toAppend | ( | const Src & | value, |
Tgt * | result | ||
) |
Strings get appended, too.
std::enable_if<IsSomeString<Tgt>::value>::type folly::toAppend | ( | StringPiece | value, |
Tgt * | result | ||
) |
and StringPiece objects too
Definition at line 492 of file Conv.h.
References folly::Range< Iter >::data(), and folly::Range< Iter >::size().
std::enable_if<IsSomeString<Tgt>::value>::type folly::toAppend | ( | const fbstring & | value, |
Tgt * | result | ||
) |
There's no implicit conversion from fbstring to other string types, so make a specialization.
Definition at line 503 of file Conv.h.
References buffer(), folly::basic_fbstring< E, T, A, Storage >::data(), estimateSpaceNeeded(), folly::basic_fbstring< E, T, A, Storage >::size(), T, toAppend(), type, uint64_t, uint64ToBufferUnsafe(), value, and value().
std::enable_if< IsSomeString<typename std::remove_pointer<Tgt>::type>::value>::type folly::toAppendStrImpl | ( | const T & | v, |
Tgt | result | ||
) |
Variadic base case: append one element
Definition at line 809 of file Conv.h.
References a, b, convertTo(), Delimiter, folly::detail::digits_to(), folly::detail::digits_to< char >(), folly::detail::digits_to< int >(), folly::detail::digits_to< long >(), folly::detail::digits_to< long long >(), folly::detail::digits_to< short >(), folly::detail::digits_to< signed char >(), folly::detail::digits_to< unsigned char >(), folly::detail::digits_to< unsigned int >(), folly::detail::digits_to< unsigned long >(), folly::detail::digits_to< unsigned long long >(), folly::detail::digits_to< unsigned short >(), folly::detail::getLastElement(), folly::pushmi::__adl::noexcept(), reserveInTargetDelim(), folly::detail::str_to_bool(), folly::detail::str_to_floating(), folly::detail::str_to_floating< double >(), folly::detail::str_to_floating< float >(), folly::detail::str_to_integral(), folly::detail::str_to_integral< char >(), folly::detail::str_to_integral< int >(), folly::detail::str_to_integral< long >(), folly::detail::str_to_integral< long long >(), folly::detail::str_to_integral< short >(), folly::detail::str_to_integral< signed char >(), folly::detail::str_to_integral< unsigned char >(), folly::detail::str_to_integral< unsigned int >(), folly::detail::str_to_integral< unsigned long >(), folly::detail::str_to_integral< unsigned long long >(), folly::detail::str_to_integral< unsigned short >(), T, to(), toAppend(), tryTo(), type, uint64_t, value, and value().
folly::dynamic folly::toDynamic | ( | const wangle::SSLSessionCacheData & | data | ) |
Definition at line 24 of file SSLSessionCacheData.cpp.
References wangle::SSLSessionCacheData::addedTime, folly::dynamic::object(), wangle::SSLSessionCacheData::serviceIdentity, wangle::SSLSessionCacheData::sessionData, and folly::basic_fbstring< E, T, A, Storage >::toStdString().
Definition at line 399 of file DynamicConverter.h.
Referenced by folly::DynamicConstructor< C, typename std::enable_if< !std::is_same< C, dynamic >::value &&dynamicconverter_detail::is_map< C >::value >::type >::construct(), folly::DynamicConstructor< C, typename std::enable_if< !std::is_same< C, dynamic >::value &&!dynamicconverter_detail::is_map< C >::value &&!std::is_constructible< StringPiece, const C & >::value &&dynamicconverter_detail::is_range< C >::value >::type >::construct(), folly::DynamicConstructor< std::pair< A, B >, void >::construct(), folly::DynamicConstructor< std::vector< bool >, void >::construct(), wangle::LRUInMemoryCache< K, V, MutexT >::convertToKeyValuePairs(), TEST(), and TEST_F().
std::string folly::toJson | ( | dynamic const & | dyn | ) |
Definition at line 915 of file json.cpp.
References folly::json::serialize().
Referenced by BENCHMARK(), proxygen::TraceEvent::MetaData::ConvVisitor< std::string >::operator()(), and TEST().
|
inline |
Definition at line 601 of file String.h.
References folly::Range< Iter >::begin(), folly::Range< Iter >::size(), and toLowerAscii().
void folly::toLowerAscii | ( | char * | str, |
size_t | length | ||
) |
Fast, in-place lowercasing of ASCII alphabetic characters in strings. Leaves all other characters unchanged, including those with the 0x80 bit set.
str | String to convert |
length | Length of str, in bytes |
Definition at line 601 of file String.cpp.
References min, uint32_t, and uint64_t.
Referenced by BENCHMARK(), proxygen::GzipHeaderCodec::encode(), fizz::server::CertManager::getCert(), fizz::server::getKeyFromIdent(), proxygen::HTTPCommonHeaders::initHeaderNames(), proxygen::ZlibServerFilter::isCompressibleContentType(), wangle::SSLContextKeyHash::operator()(), skipWhitespace(), TEST(), and toLowerAscii().
|
inline |
std::string folly::toPrettyJson | ( | dynamic const & | dyn | ) |
Definition at line 919 of file json.cpp.
References folly::json::serialization_opts::pretty_formatting, and folly::json::serialize().
Referenced by printBenchmarkResultsAsJson(), and printBenchmarkResultsAsVerboseJson().
|
inline |
Definition at line 41 of file String.h.
References folly::basic_fbstring< E, T, A, Storage >::data(), folly::basic_fbstring< E, T, A, Storage >::size(), and string.
Referenced by folly::ThreadPoolExecutor::getName(), and folly::basic_fbstring< char >::toStdString().
|
inline |
|
inline |
|
inlinestatic |
|
inline |
Returns a subpiece with all whitespace removed from the back and front of . Whitespace means any of [' ', '
', '', ''].
Definition at line 568 of file String.h.
References ltrimWhitespace(), and rtrimWhitespace().
Referenced by proxygen::HTTP1xCodec::generateHeader(), parseLogConfig(), and TEST().
int folly::truncateNoInt | ( | const char * | path, |
off_t | len | ||
) |
exception_wrapper folly::try_and_catch | ( | F && | fn | ) |
try_and_catch
is a simple replacement for try {} catch(){}
` that allows you to specify which derived exceptions you would like to catch and store in an exception_wrapper
.
Because we cannot build an equivalent of std::current_exception()
, we need to catch every derived exception that we are interested in catching.
Exceptions should be listed in the reverse order that you would write your catch statements (that is, std::exception&
should be first).
Definition at line 703 of file ExceptionWrapper.h.
References folly::detail::try_and_catch_().
|
inline |
A variant of decodeVarint() that does not throw on error. Useful in contexts where only part of a serialized varint may be attempted to be decoded, e.g., when a serialized varint arrives on the boundary of a network packet.
Definition at line 147 of file Varint.h.
References b, folly::test::begin(), folly::Range< Iter >::begin(), folly::test::end(), folly::Range< Iter >::end(), int64_t, int8_t, LIKELY, makeUnexpected(), TooFewBytes, TooManyBytes, type, uint64_t, folly::Range< Iter >::uncheckedAdvance(), val, and value().
Referenced by decodeVarint(), folly::io::StreamCodec::doUncompress(), and folly::test::testVarintFail().
|
noexcept |
Definition at line 249 of file Try-inl.h.
References folly::Try< T >::emplace(), and folly::Try< T >::emplaceException().
Referenced by folly::coro::TimedWaitAwaitable< Awaitable >::SharedState::setValue(), and TEST().
|
inlinenoexcept |
|
noexcept |
Definition at line 266 of file Try-inl.h.
References folly::Try< T >::emplace(), folly::Try< T >::emplaceException(), and folly::Try< T >::value().
Referenced by folly::fibers::FiberManager::AddTaskFinallyHelper< F, G >::Func::operator()(), folly::fibers::FiberManager::runInMainContext(), and TEST().
Definition at line 282 of file Try-inl.h.
References folly::Try< void >::emplace(), folly::Try< void >::emplaceException(), and folly::Try< T >::value().
std::shared_ptr< ShutdownSocketSet > folly::tryGetShutdownSocketSet | ( | ) |
Definition at line 29 of file GlobalShutdownSocketSet.cpp.
References folly::Singleton< T, Tag, VaultTag >::try_get().
ReadMostlySharedPtr< ShutdownSocketSet > folly::tryGetShutdownSocketSetFast | ( | ) |
Definition at line 32 of file GlobalShutdownSocketSet.cpp.
References folly::Singleton< T, Tag, VaultTag >::try_get_fast().
std::enable_if< std::is_same<Tgt, typename std::decay<Src>::type>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | Src && | value | ) |
std::enable_if< std::is_arithmetic<Src>::value && !std::is_same<Tgt, Src>::value && std::is_same<Tgt, bool>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const Src & | value | ) |
std::enable_if< detail::is_duration<Tgt>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const struct timespec & | ts | ) |
struct timespec to std::chrono::duration
Definition at line 595 of file Conv.h.
References type.
Referenced by toAppendStrImpl().
std::enable_if< detail::is_duration<Tgt>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const struct timeval & | tv | ) |
std::enable_if< detail::is_time_point<Tgt>::value && detail::is_posix_time_type<Src>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const Src & | value | ) |
std::enable_if< std::is_same<Tgt, struct timespec>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const std::chrono::duration< Rep, Period > & | duration | ) |
std::chrono::duration to struct timespec
Definition at line 629 of file Conv.h.
References makeUnexpected(), type, and value.
std::enable_if< std::is_same<Tgt, struct timeval>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const std::chrono::duration< Rep, Period > & | duration | ) |
std::chrono::duration to struct timeval
Definition at line 648 of file Conv.h.
References makeUnexpected(), and type.
std::enable_if< detail::is_posix_time_type<Tgt>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const std::chrono::time_point< Clock, Duration > & | timePoint | ) |
|
noexcept |
|
inline |
String or StringPiece to target conversion. Accepts leading and trailing whitespace, but no non-space trailing characters.
Definition at line 1475 of file Conv.h.
References folly::gen::move, parseTo(), type, and value.
Expected<Tgt, detail::ParseToError<Tgt> > folly::tryTo | ( | StringPiece * | src | ) |
tryTo/to that take the strings by pointer so the caller gets information about how much of the string was consumed by the conversion. These do not check for trailing whitepsace.
Definition at line 1523 of file Conv.h.
References folly::gen::move, and parseTo().
std::enable_if< std::is_enum<Src>::value && !std::is_same<Src, Tgt>::value && !std::is_convertible<Tgt, StringPiece>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const Src & | value | ) |
std::enable_if< !std::is_convertible<Src, StringPiece>::value && std::is_enum<Tgt>::value && !std::is_same<Src, Tgt>::value, Expected<Tgt, ConversionCode> >::type folly::tryTo | ( | const Src & | value | ) |
auto folly::tuplePrepend | ( | T && | car, |
U && | cdr | ||
) | -> decltype(std::tuple_cat( std::make_tuple(std::forward<T>(car)), std::forward<U>(cdr))) |
Definition at line 117 of file TupleOps.h.
References std::tr1::make_tuple().
Referenced by folly::test::TupleTo< std::tuple< U, Us... >, T >::convert(), and folly::test::TEST().
auto folly::tupleRange | ( | T && | v | ) | -> decltype(detail::TupleSelect<Seq>::select(std::forward<T>(v))) |
Definition at line 110 of file TupleOps.h.
folly::TYPED_TEST | ( | SynchronizedTest | , |
Basic | |||
) |
Definition at line 61 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
WithLock | |||
) |
Definition at line 65 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
Unlock | |||
) |
Definition at line 69 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
Deprecated | |||
) |
Definition at line 73 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
Concurrency | |||
) |
Definition at line 77 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
AcquireLocked | |||
) |
Definition at line 81 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
AcquireLockedWithConst | |||
) |
Definition at line 85 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
DualLocking | |||
) |
Definition at line 89 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
DualLockingWithConst | |||
) |
Definition at line 93 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
ConstCopy | |||
) |
Definition at line 97 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
InPlaceConstruction | |||
) |
Definition at line 101 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTest | , |
Exchange | |||
) |
Definition at line 105 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTimedTest | , |
Timed | |||
) |
Definition at line 128 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTimedTest | , |
TimedSynchronized | |||
) |
Definition at line 132 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTimedWithConstTest | , |
TimedShared | |||
) |
Definition at line 153 of file SynchronizedTest.cpp.
folly::TYPED_TEST | ( | SynchronizedTimedWithConstTest | , |
TimedSynchronizeWithConst | |||
) |
Definition at line 157 of file SynchronizedTest.cpp.
folly::TYPED_TEST_CASE | ( | SynchronizedTest | , |
SynchronizedTestTypes | |||
) |
Referenced by fizz::test::CertTestTyped< T >::SetUp().
folly::TYPED_TEST_CASE | ( | SynchronizedTimedTest | , |
SynchronizedTimedTestTypes | |||
) |
folly::TYPED_TEST_CASE | ( | SynchronizedTimedWithConstTest | , |
SynchronizedTimedWithConstTestTypes | |||
) |
Copies the ASCII base 10 representation of v into buffer and returns the number of bytes written. Does NOT append a \0. Assumes the buffer points to digits10(v) bytes of valid memory. Note that uint64 needs at most 20 bytes, uint32_t needs at most 10 bytes, uint16_t needs at most 5 bytes, and so on. Measurements suggest that defining a separate overload for 32-bit integers is not worthwhile.
This primitive is unsafe because it makes the size assumption and because it does not add a terminating \0.
Definition at line 383 of file Conv.h.
References digits10(), and uint32_t.
Referenced by folly::detail::assertionFailure(), folly::FormatValue< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value >::type >::doFormat(), estimateSpaceNeeded(), folly::symbolizer::SymbolizePrinter::print(), toAppend(), u2aAppendFollyBM(), and u64ToAsciiFollyBM().
auto folly::ulock | ( | Synchronized< D, M > & | synchronized, |
Args &&... | args | ||
) |
Definition at line 1527 of file Synchronized.h.
References testing::Args(), D, M, and folly::detail::ulock().
Referenced by folly::RequestContext::clearContextData(), folly::RequestContext::doSetContextData(), folly::fibers::TimedMutex::lockHelper(), folly::fibers::TimedRWMutex< BatonType >::read_lock(), TEST_F(), folly::fibers::TimedRWMutex< BatonType >::timed_read_lock(), folly::fibers::TimedRWMutex< BatonType >::timed_write_lock(), folly::SynchronizedBase< Subclass, detail::MutexLevel::UPGRADE >::withULock(), folly::SynchronizedBase< Subclass, detail::MutexLevel::UPGRADE >::withULockPtr(), and folly::fibers::TimedRWMutex< BatonType >::write_lock().
|
inlinenoexcept |
Returns the number of uncaught exceptions.
This function is based on Evgeny Panasyuk's implementation from here: http://fburl.com/15190026
Definition at line 52 of file UncaughtExceptions.h.
References __cxxabiv1::__cxa_get_globals().
Referenced by InheritsThrowingConstructor::InheritsThrowingConstructor(), makeGuard(), TEST(), Validator::validate(), and ThrowInDestructor< N, I >::~ThrowInDestructor().
auto folly::uncurry | ( | F && | f | ) | -> detail::apply_tuple::Uncurry<typename std::decay<F>::type> |
Wraps a function taking N arguments into a function which accepts a tuple of N arguments. Note: This function will also accept an std::pair if N == 2.
For example, given the below code:
std::vector<std::tuple<int, int, int>> rows = ...; auto test = [](std::tuple<int, int, int>& row) { return std::get<0>(row) * std::get<1>(row) * std::get<2>(row) == 24; }; auto found = std::find_if(rows.begin(), rows.end(), test);
'test' could be rewritten as:
auto test = folly::uncurry([](int a, int b, int c) { return a * b * c == 24; });
Definition at line 178 of file ApplyTuple.h.
References f, and make_from_tuple().
Referenced by TEST().
|
inline |
OutputString folly::unhexlify | ( | StringPiece | input | ) |
bool folly::unhexlify | ( | const InputString & | input, |
OutputString & | output | ||
) |
Same functionality as Python's binascii.unhexlify. Returns true on successful conversion.
Definition at line 616 of file String-inl.h.
References folly::detail::hexDumpLine(), folly::detail::hexTable, i, ptr, size(), string, and uint8_t.
Referenced by BENCHMARK(), fizz::test::HandshakeTypesTest::decodeHex(), fizz::test::ZlibCertificateCompressorTest::decodeHex(), fizz::test::ExtensionsTest::getBuf(), fizz::test::PlaintextRecordTest::getBuf(), fizz::extensions::test::TokenBindingConstructorTest::getBuf(), fizz::test::EncryptedRecordTest::getBuf(), fizz::test::RecordTest::getBuf(), fizz::extensions::test::ValidatorTest::getBuf(), fizz::testing::getKey(), fizz::test::getKey(), fizz::server::test::getV2ClientHello(), hexlify(), fizz::testing::setPoint(), fizz::test::setPoint(), fizz::test::TEST(), TEST(), fizz::test::TEST_F(), fizz::testing::TEST_P(), TEST_P(), fizz::test::toIOBuf(), toIOBuf(), fizz::test::TYPED_TEST(), and unhexlify().
auto folly::unorderedReduce | ( | Collection && | c, |
T && | initial, | ||
F && | func | ||
) | -> decltype(unorderedReduce( c.begin(), c.end(), std::forward<T>(initial), std::forward<F>(func))) |
Sugar for the most common case.
Definition at line 479 of file helpers.h.
References c, and unorderedReduce().
Future< T > folly::unorderedReduce | ( | It | first, |
It | last, | ||
T | initial, | ||
F | func | ||
) |
like reduce, but calls func on finished futures as they complete does NOT keep the order of the input
Definition at line 1881 of file Future-inl.h.
References exchange(), f, folly::gen::first, folly::Promise< T >::getFuture(), i, folly::InlineExecutor::instance(), lock(), folly::Future< T >::makeFuture, folly::gen::move, promise_, folly::pushmi::detail::t, and T.
Referenced by reduce(), TEST(), and unorderedReduce().
|
inlinestatic |
Definition at line 243 of file IPAddressV6.cpp.
References count, i, and unpack().
Referenced by folly::IPAddressV6::getIPv4For6To4(), and folly::IPAddressV6::type().
|
inline |
Definition at line 112 of file AsyncTransport.h.
Referenced by folly::AsyncSocket::adjustZeroCopyFlags(), proxygen::HTTPSession::WriteSegment::setCork(), and proxygen::HTTPSession::WriteSegment::setEOR().
auto folly::unwrapTryTuple | ( | Tuple && | ) |
Tuple<Try<Type>...> -> std::tuple<Type...>
Unwraps a tuple-like type containing a sequence of Try<Type> instances to std::tuple<Type>
Definition at line 320 of file Try-inl.h.
References type, and folly::try_detail::unwrapTryTupleImpl().
Referenced by collect(), and TEST().
String folly::uriEscape | ( | StringPiece | str, |
UriEscapeMode | mode = UriEscapeMode::ALL |
||
) |
Similar to uriEscape above, but returns the escaped string.
Definition at line 137 of file String.h.
References ALL, mode, uriEscape(), and uriUnescape().
void folly::uriEscape | ( | StringPiece | str, |
String & | out, | ||
UriEscapeMode | mode | ||
) |
Definition at line 166 of file String-inl.h.
References folly::Range< Iter >::begin(), c, folly::Range< Iter >::end(), LIKELY, mode, QUERY, folly::Range< Iter >::size(), folly::detail::uriEscapeTable, and v.
Referenced by TEST(), and uriEscape().
String folly::uriUnescape | ( | StringPiece | str, |
UriEscapeMode | mode = UriEscapeMode::ALL |
||
) |
Similar to uriUnescape above, but returns the unescaped string.
Definition at line 159 of file String.h.
References backslashify(), FOLLY_PRINTF_FORMAT, FOLLY_PRINTF_FORMAT_ATTR, format(), mode, gmock_output_test::output, string, stringAppendf(), stringPrintf(), stringVAppendf(), stringVPrintf(), and uriUnescape().
void folly::uriUnescape | ( | StringPiece | str, |
String & | out, | ||
UriEscapeMode | mode = UriEscapeMode::ALL |
||
) |
URI-unescape a string. Appends the result to the output string.
In QUERY mode, '+' are replaced by space. XX sequences are decoded if XX is a valid hex sequence, otherwise we throw invalid_argument.
Definition at line 201 of file String-inl.h.
References folly::Range< Iter >::begin(), c, folly::Range< Iter >::end(), FOLLY_FALLTHROUGH, folly::detail::hexTable, QUERY, folly::Range< Iter >::size(), and UNLIKELY.
Referenced by proxygen::HTTPMessage::getDecodedQueryParam(), TEST(), uriEscape(), and uriUnescape().
|
inlinenoexcept |
Determine if we are using jemalloc or not.
Definition at line 147 of file Malloc.h.
References counter, dallocx, mallctl, mallctlbymib, mallctlnametomib, mallocx, nallocx, folly::pushmi::__adl::noexcept(), ptr, rallocx, sallocx, sdallocx, uint64_t, and xallocx.
Referenced by folly::fbvector< T, Allocator >::emplace_back_aux(), folly::detail::MemoryIdler::flushLocalMallocCaches(), goodMallocSize(), folly::JemallocHugePageAllocator::init(), main(), folly::detail::mallctlHelper(), folly::TypedIOBuf< T >::push(), folly::threadlocal_detail::StaticMetaBase::reallocate(), folly::fbvector< HTTPHeaderCode >::reserve_in_place(), folly::IOBuf::reserveSlow(), folly::fbvector< HTTPHeaderCode >::shrink_to_fit(), and TEST().
char32_t folly::utf8ToCodePoint | ( | const unsigned char *& | p, |
const unsigned char *const | e, | ||
bool | skipOnError | ||
) |
Definition at line 52 of file Unicode.cpp.
References i, folly::gen::skip(), and uint32_t.
Referenced by folly::json::escapeStringImpl(), testInvalid(), and testValid().
uint64_t folly::value | ( | const typename LockFreeRingBuffer< T, Atom >::Cursor & | rbcursor | ) |
Definition at line 96 of file LockFreeRingBufferTest.cpp.
References Atom, ticket, and uint64_t.
Referenced by folly::compression::BitVectorEncoder< Value, SkipValue, kSkipQuantum, kForwardQuantum >::add(), folly::compression::EliasFanoEncoderV2< Value, SkipValue, kSkipQuantum, kForwardQuantum >::add(), folly::FutureExecutor< ExecutorImpl >::addFuture(), folly::fibers::TaskIterator< T >::addTask(), folly::fibers::FiberManager::addTaskFinally(), allocationBytesForOverAligned(), folly::gen::detail::Interleave< Container >::Generator< Value, Source >::apply(), folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result >::apply(), folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::apply(), folly::DynamicParser::arrayItems(), folly::expected_detail::ExpectedStorage< Value, Error >::assign(), folly::expected_detail::ExpectedStorage< Value, Error, StorageType::eUnion >::assign(), folly::expected_detail::ExpectedStorage< Value, Error, StorageType::ePODStruct >::assign(), folly::expected_detail::ExpectedStorage< Value, Error, StorageType::eUnion >::assignValue(), folly::detail::avgHelper(), folly::fibers::TaskIterator< T >::awaitNext(), BENCHMARK(), folly::AsyncUDPSocket::bind(), folly::Bits< T, Traits >::blockCount(), folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::blockingWrite(), folly::detail::chronoRangeCheck(), folly::Optional< Value >::StorageNonTriviallyDestructible::clear(), folly::expected_detail::ExpectedStorage< Value, Error, StorageType::eUnion >::clear(), folly::fibers::collectAll(), folly::fibers::collectAny(), folly::fibers::collectN(), non_atomic< T >::compare_exchange_strong(), non_atomic< T >::compare_exchange_weak(), folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Pusher< all >::compose(), folly::SSLServerAcceptCallbackDelay::connAccepted(), folly::detail::convertTo(), copy(), folly::io::compression::detail::dataStartsWithLE(), folly::exception_wrapper_detail::dont_slice(), folly::Optional< NamedGroup >::emplace(), folly::AtomicUnorderedInsertMap< Key, Value, Hash, KeyEqual, SkipKeyValueDeletion, Atom, IndexType, Allocator >::emplace(), folly::detail::enforceWhitespace(), folly::detail::errorValue(), folly::TDigest::estimateQuantile(), estimateSpaceNeeded(), folly::exception_wrapper::exception_wrapper(), folly::Expected< int, E >::Expected(), folly::detail::SignedValueHandler< T, false >::finalize(), folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::foreach(), folly::settings::Snapshot::forEachSetting(), folly::experimental::EnvironmentState::fromCurrentEnvironment(), folly::padded::Adaptor< IntNodeVec >::fullNode(), folly::Future< folly::folly::Unit >::Future(), folly::FutureExecutor< ExecutorImpl >::FutureExecutor(), folly::compression::generateRandomList(), folly::Try< folly::folly::Unit >::get(), folly::coro::get_awaiter(), get_default(), get_ref_default(), folly::LogCategory::getLevelInfo(), folly::detail::HistogramBuckets< ValueType, ContainerType >::getNumBuckets(), folly::LogName::hash(), folly::detail::ReadMostlySharedPtrCore< T, DefaultRefCount >::increfWeak(), folly::Indestructible< T >::Indestructible(), folly::sorted_vector_set< folly::RequestData * >::insert(), folly::sorted_vector_map< Key, Value, Compare, Allocator, GrowthPolicy, Container >::insert(), folly::detail::insert_with_hint(), folly::InlineExecutor::instance(), folly::poly::INullablePointer::Interface< Base >::Interface(), folly::for_each_detail::invoke_returning_loop_control(), is_const(), join(), folly::gen::just(), non_atomic< T >::load(), loadUnaligned(), logConfigToDynamic(), Application::loop(), makeConversionError(), makePromiseContract(), folly::futures::map(), folly::TimeseriesHistogram< T, CT, C >::maybeHandleSingleUniqueValue(), SimpleDigest< MergeSize >::merge(), folly::pushmi::__adl::noexcept(), folly::NonDefaultConstructibleMutex::NonDefaultConstructibleMutex(), folly::DynamicParser::objectItems(), folly::gen::Get< n >::operator()(), folly::gen::Cast< Dest >::operator()(), folly::gen::To< Dest >::operator()(), folly::gen::TryTo< Dest >::operator()(), folly::detail::ReturnUnit< Error >::operator()(), folly::Try< folly::folly::Unit >::operator*(), folly::Optional< NamedGroup >::operator*(), folly::Try< void >::operator*(), folly::Expected< int, E >::operator*(), folly::TLRefCount::operator++(), operator+=(), operator-=(), folly::Try< folly::folly::Unit >::operator->(), folly::Optional< NamedGroup >::operator->(), folly::Expected< int, E >::operator->(), operator<<(), folly::poly::INullablePointer::Interface< Base >::operator=(), folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=(), folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=(), CheckedInt::operator=(), folly::DynamicParser::optional(), folly::DynamicParser::ParserStack::ParserStack(), folly::detail::parseToWrap(), partialLoadUnaligned(), poly_empty(), poly_move(), prettyToDouble(), folly::FileWriterFactory::processOption(), folly::TimeseriesHistogram< T, CT, C >::rate(), folly::detail::rawOverAlignedImpl(), folly::Replaceable< T >::Replaceable(), folly::DynamicParser::required(), folly::EventBase::SmoothLoopTime::reset(), folly::futures::detail::retryingImpl(), folly::coro::detail::TaskPromise< T >::return_value(), rref(), folly::test::run_timed_wait_regular_test(), folly::settings::detail::saveValueForOutstandingSnapshots(), folly::SemiFuture< T >::SemiFuture(), folly::DynamicParser::setAllowNonStringKeyErrors(), folly::FlatCombining< T, Mutex, Atom, Req >::Rec::setFn(), folly::EventBase::setMaxLatency(), folly::AsyncSocket::setNoDelay(), folly::AsyncSocket::setQuickAck(), folly::SharedPromise< folly::folly::Unit >::setValue(), folly::coro::TimedWaitAwaitable< Awaitable >::SharedState::setValue(), folly::Promise< folly::folly::Unit >::setValue(), folly::AtomicHashMap< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::SimpleRetT::SimpleRetT(), folly::compression::BitVectorReader< Encoder, Instructions, kUnchecked >::skipTo(), folly::EventBase::SmoothLoopTime::SmoothLoopTime(), folly::detail::splitFixed(), splitTo(), folly::Optional< NamedGroup >::swap(), folly::test::TEST(), TEST(), TEST(), TEST_F(), TEST_F(), testFiberLocal(), folly::compression::testJumpTo(), testRangeFunc(), folly::compression::testSkipTo(), folly::sync_tests::testUnlock(), folly::sync_tests::testUnlockCommon(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::then_(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::thenOrThrow_(), folly::settings::detail::SettingCore< T >::tlValue(), folly::settings::detail::SettingCore< T >::tlValueSlow(), to(), toAppend(), toAppendStrImpl(), folly::experimental::EnvironmentState::toPointerArray(), folly::Try< folly::folly::Unit >::Try(), folly::RWSpinLock::try_lock_shared(), folly::RWSpinLock::try_lock_upgrade(), tryDecodeVarint(), tryTo(), folly::MacAddress::u64HBO(), folly::futures::detail::FutureBase< T >::valid(), AtomicBatchDispatcherTesting::validateResults(), folly::detail::distributed_mutex::wake(), folly::SemiFuture< T >::within(), folly::detail::LifoSemHead::withPush(), folly::detail::LifoSemHead::withValueDecr(), folly::gen::detail::PMap< Predicate >::Generator< Value, Source, Input, Output >::ExecutionPipeline::write(), folly::LockFreeRingBuffer< T, Atom >::write(), folly::detail::RingBufferSlot< T, Atom >::write(), folly::io::detail::Writable< Appender >::write(), folly::io::QueueAppender::write(), folly::LockFreeRingBuffer< T, Atom >::writeAndGetCursor(), folly::detail::writeIntegerString(), folly::io::QueueAppender::writeSlow(), folly::coro::detail::BlockingWaitPromise< T & >::yield_value(), folly::detail::BufferedStat< folly::TDigest, ClockT >::~BufferedStat(), folly::StandardLogHandlerFactory::OptionProcessor::~OptionProcessor(), and folly::detail::SingleElementQueue< T, Atom >::~SingleElementQueue().
decltype(auto) folly::variant_match | ( | Variant && | variant, |
Cases &&... | cases | ||
) |
Definition at line 74 of file Overload.h.
References apply_visitor(), and overload().
Referenced by fizz::client::AsyncFizzClientT< SM >::deliverHandshakeError(), fizz::server::test::ServerProtocolTest::getActions(), fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >::moveToErrorState(), fizz::client::AsyncFizzClientT< SM >::ActionMoveVisitor::operator()(), fizz::server::detail::processEvent(), fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >::processPendingEvents(), fizz::server::FizzServer< ActionMoveVisitor, SM >::startActions(), and folly::test::TEST().
Formatter<true, C> folly::vformat | ( | StringPiece | fmt, |
C && | container | ||
) |
Formatter<true, Container> folly::vformat | ( | StringPiece | fmt, |
Container && | container | ||
) |
Create a formatter object that takes one argument (of container type) and uses that container to get argument values from.
std::map<string, string> map { {"hello", "world"}, {"answer", "42"} };
The following are equivalent: format("{0[hello]} {0[answer]}", map);
vformat("{hello} {answer}", map);
but the latter is cleaner.
std::enable_if<IsSomeString<Str>::value>::type folly::vformat | ( | Str * | out, |
StringPiece | fmt, | ||
Container && | container | ||
) |
Append vformatted output to a string.
Definition at line 378 of file Format.h.
References testing::Args(), folly::format_value::formatFormatter(), folly::format_value::formatNumber(), folly::format_value::formatString(), and val.
Referenced by svformat(), and vformatChecked().
Formatter<true, Container> folly::vformatChecked | ( | StringPiece | fmt, |
Container && | container | ||
) |
Definition at line 473 of file Format.h.
References vformat().
std::enable_if<IsSomeString<Str>::value>::type folly::vformatChecked | ( | Str * | out, |
StringPiece | fmt, | ||
Container && | container | ||
) |
Definition at line 489 of file Format.h.
References FOLLY_POP_WARNING.
Referenced by svformatChecked().
auto folly::via | ( | Executor * | , |
Func && | func | ||
) | -> Future< typename isFutureOrSemiFuture< decltype(std::declval< Func >()())>::Inner > |
Execute a function via the given executor and return a future. This is semantically equivalent to via(executor).then(func), but easier to read and slightly more efficient.
Definition at line 1290 of file Future-inl.h.
References f, and folly::Future< T >::via().
Referenced by wangle::ServerBootstrap< DefaultPipeline >::bind(), fGen(), folly::Future< folly::folly::Unit >::Future(), keepAliveTest(), folly::futures::map(), folly::SemiFuture< T >::SemiFuture(), TEST(), TEST_F(), folly::Future< folly::folly::Unit >::then(), virtualExecutorTest(), and WeakRefTest().
auto folly::via | ( | Executor::KeepAlive<> | x, |
Func && | func | ||
) | -> Future< typename isFutureOrSemiFuture< decltype(std::declval< Func >()())>::Inner > |
Definition at line 1299 of file Future-inl.h.
References f, folly::gen::move, and folly::Future< T >::via().
Definition at line 1369 of file Future-inl.h.
References folly::Future< T >::makeFuture.
|
inline |
Definition at line 1373 of file Future-inl.h.
References FOLLY_ALWAYS_INLINE, FOLLY_ATTR_VISIBILITY_HIDDEN, folly::Future< T >::makeFuture, and folly::gen::move.
Carry out the computation contained in the given future if the predicate holds.
thunk behaves like std::function<Future<T2>(void)>
Definition at line 2330 of file Future-inl.h.
References folly::Future< T >::makeFuture.
Referenced by folly::Future< folly::folly::Unit >::Future(), option(), TEST(), test(), folly::detail::MPMCQueueBase< Derived< T, Atom, Dynamic > >::tryObtainPromisedPopTicketUntil(), folly::detail::MPMCQueueBase< Derived< T, Atom, Dynamic > >::tryObtainPromisedPushTicketUntil(), folly::detail::MPMCQueueBase< Derived< T, Atom, Dynamic > >::tryReadUntil(), folly::detail::SingleElementQueue< T, Atom >::tryWaitForDequeueTurnUntil(), and folly::detail::SingleElementQueue< T, Atom >::tryWaitForEnqueueTurnUntil().
Carry out the computation contained in the given future if while the predicate continues to hold.
thunk behaves like std::function<Future<T2>(void)>
predicate behaves like std::function<bool(void)>
Definition at line 2335 of file Future-inl.h.
References folly::Future< T >::makeFuture, folly::gen::move, and folly::Future< T >::whileDo.
Referenced by folly::Future< folly::folly::Unit >::Future(), TEST(), and times().
std::vector< Future< Result > > folly::window | ( | Collection | input, |
F | func, | ||
size_t | n | ||
) |
window creates up to n Futures using the values in the collection, and then another Future for each Future that completes
this is basically a sliding window of Futures of size n
func must return a Future for each value in input
Definition at line 1789 of file Future-inl.h.
References folly::pushmi::executor, folly::QueuedImmediateExecutor::instance(), and folly::gen::move.
Referenced by collectN(), TEST(), and window().
auto folly::window | ( | size_t | times, |
F | func, | ||
size_t | n | ||
) | -> std::vector<invoke_result_t<F, size_t>> |
Definition at line 1796 of file Future-inl.h.
References folly::gen::move, folly::Future< T >::times, and window().
std::vector< Future< Result > > folly::window | ( | Executor * | executor, |
Collection | input, | ||
F | func, | ||
size_t | n | ||
) |
Definition at line 1803 of file Future-inl.h.
References getKeepAliveToken(), folly::gen::move, and window().
std::vector< Future< Result > > folly::window | ( | Executor::KeepAlive<> | executor, |
Collection | input, | ||
F | func, | ||
size_t | n | ||
) |
Definition at line 1810 of file Future-inl.h.
References folly::Executor::KeepAlive< ExecutorT >::copy(), folly::pushmi::executor, i, makeSemiFutureWith(), max, min, folly::gen::move, folly::pushmi::detail::t, and folly::Future< T >::via().
|
static |
Definition at line 29 of file ThreadedExecutor.cpp.
Referenced by folly::ThreadedExecutor::add(), folly::ThreadedExecutor::controlJoinFinishedThreads(), folly::ThreadedExecutor::controlLaunchEnqueuedTasks(), folly::ThreadedExecutor::notify(), and folly::ThreadedExecutor::work().
auto folly::wlock | ( | Synchronized< D, M > & | synchronized, |
Args &&... | args | ||
) |
Helper functions that should be passed to either a lock() or synchronized() invocation, these return implementation defined structs that will be used to lock the synchronized instance appropriately.
lock(wlock(one), rlock(two), wlock(three)); synchronized([](auto one, two) { ... }, wlock(one), rlock(two));
For example in the above rlock() produces an implementation defined read locking helper instance and wlock() a write locking helper
Subsequent arguments passed to these locking helpers, after the first, will be passed by const-ref to the corresponding function on the synchronized instance. This means that if the function accepts these parameters by value, they will be copied. Note that it is not necessary that the primary locking function will be invoked at all (for eg. the implementation might just invoke the try*Lock() method)
// Try to acquire the lock for one second synchronized([](auto) { ... }, wlock(one, 1s));
// The timed lock acquire might never actually be called, if it is not // needed by the underlying deadlock avoiding algorithm synchronized([](auto, auto) { ... }, rlock(one), wlock(two, 1s));
Note that the arguments passed to to *lock() calls will be passed by const-ref to the function invocation, as the implementation might use them many times
Definition at line 1519 of file Synchronized.h.
References testing::Args(), Mutex, and folly::detail::wlock().
Referenced by folly::RequestContext::clearContextData(), folly::threadlocal_detail::StaticMetaBase::destroy(), folly::RequestContext::doSetContextData(), TEST(), TEST_F(), folly::SynchronizedPtr< PointerType, MutexType >::withWLock(), folly::SynchronizedBase< Subclass, detail::MutexLevel::SHARED >::withWLock(), and folly::SynchronizedBase< Subclass, detail::MutexLevel::SHARED >::withWLockPtr().
bool folly::writeFile | ( | const Container & | data, |
const char * | filename, | ||
int | flags = O_WRONLY | O_CREAT | O_TRUNC , |
||
mode_t | mode = 0666 |
||
) |
Writes container to file. The container is assumed to be contiguous, with element size equal to 1, and offering STL-like methods empty(), size(), and indexed access (e.g. std::vector<char>, std::string, fbstring, StringPiece).
"flags" dictates the open flags to use. Default is to create file if it doesn't exist and truncate it.
Returns: true on success or false on failure. In the latter case errno will be set appropriately by the failing system primitive.
Note that this function may leave the file in a partially written state on failure. Use writeFileAtomic() if you want to ensure that the existing file state will be unchanged on error.
Definition at line 211 of file FileUtil.h.
References closeNoInt(), data(), mode, writeFileAtomic(), writeFileAtomicNoThrow(), and writeFull().
Referenced by MultiFilePollerTest::delayedWrite(), WriteFileAfterFork::operator()(), folly::test::ReadFileFd::SetUp(), folly::test::TEST(), TEST(), and TEST_F().
void folly::writeFileAtomic | ( | StringPiece | filename, |
iovec * | iov, | ||
int | count, | ||
mode_t | permissions = 0644 |
||
) |
Write file contents "atomically".
This writes the data to a temporary file in the destination directory, and then renames it to the specified path. This guarantees that the specified file will be replaced the the specified contents on success, or will not be modified on failure.
Note that on platforms that do not provide atomic filesystem rename functionality (e.g., Windows) this behavior may not be truly atomic.
Definition at line 224 of file FileUtil.cpp.
References folly::Range< Iter >::str(), string, and writeFileAtomicNoThrow().
Referenced by fizz::test::TEST(), folly::test::TEST_F(), writeFile(), and writeFileAtomic().
void folly::writeFileAtomic | ( | StringPiece | filename, |
ByteRange | data, | ||
mode_t | permissions | ||
) |
Definition at line 236 of file FileUtil.cpp.
References folly::Range< Iter >::data(), folly::Range< Iter >::size(), and writeFileAtomic().
void folly::writeFileAtomic | ( | StringPiece | filename, |
StringPiece | data, | ||
mode_t | permissions | ||
) |
Definition at line 243 of file FileUtil.cpp.
References writeFileAtomic().
int folly::writeFileAtomicNoThrow | ( | StringPiece | filename, |
iovec * | iov, | ||
int | count, | ||
mode_t | permissions = 0644 |
||
) |
A version of writeFileAtomic() that returns an errno value instead of throwing on error.
Returns 0 on success or an errno value on error.
Definition at line 158 of file FileUtil.cpp.
References folly::netops::close(), folly::Range< Iter >::data(), SCOPE_EXIT, folly::Range< Iter >::size(), folly::detail::success, suffix, and writevFull().
Referenced by writeFile(), and writeFileAtomic().
ssize_t folly::writeFull | ( | int | fd, |
const void * | buf, | ||
size_t | n | ||
) |
Similar to readFull and preadFull above, wrappers around write() and pwrite() that loop until all data is written.
Generally, the write() / pwrite() system call may always write fewer bytes than requested, just like read(). In certain cases (such as when writing to a pipe), POSIX provides stronger guarantees, but not in the general case. For example, Linux (even on a 64-bit platform) won't write more than 2GB in one write() system call.
Note that writevFull and pwritevFull require iov to be non-const, unlike writev and pwritev. The contents of iov after these functions return is unspecified.
These functions return -1 on error, or the total number of bytes written (which is always the same as the number of requested bytes) on success.
Definition at line 134 of file FileUtil.cpp.
References folly::fileutil_detail::wrapFull(), and fizz::detail::write().
Referenced by folly::LogCategory::admitMessage(), folly::detail::assertionFailure(), folly::LoggerDB::defaultInternalWarningImpl(), folly::symbolizer::FDSymbolizePrinter::doPrint(), folly::symbolizer::FDSymbolizePrinter::flush(), folly::AsyncFileWriter::performIO(), wangle::FilePersistenceLayer< K, V >::persist(), shutdownNoInt(), TEST(), TEST_F(), testInvalidFile(), testValidFile(), TYPED_TEST(), folly::symbolizer::test::writeAll(), writeFile(), and folly::ImmediateFileWriter::writeMessage().
ssize_t folly::writeNoInt | ( | int | fd, |
const void * | buf, | ||
size_t | count | ||
) |
Definition at line 114 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt(), and fizz::detail::write().
Referenced by folly::AsyncPipeWriter::handleWrite(), folly::Subprocess::pid(), shutdownNoInt(), and TEST().
void folly::writeTo | ( | FILE * | fp, |
const BaseFormatter< Derived, containerMode, Args... > & | formatter | ||
) |
Formatter objects can be written to stdio FILEs.
Definition at line 283 of file Format-inl.h.
References throwSystemError().
Referenced by operator<<(), and TEST().
ssize_t folly::writevFull | ( | int | fd, |
iovec * | iov, | ||
int | count | ||
) |
Definition at line 150 of file FileUtil.cpp.
References folly::fileutil_detail::wrapvFull().
Referenced by folly::AsyncFileWriter::performIO(), shutdownNoInt(), and writeFileAtomicNoThrow().
ssize_t folly::writevNoInt | ( | int | fd, |
const iovec * | iov, | ||
int | count | ||
) |
Definition at line 122 of file FileUtil.cpp.
References folly::fileutil_detail::wrapNoInt().
Referenced by shutdownNoInt().
constexpr bool folly::xlogIsDirSeparator | ( | char | c | ) |
Definition at line 508 of file xlog.h.
References kIsWindows, and folly::detail::xlogStripFilenameRecursive().
Referenced by folly::detail::xlogStripFilenameMatchFound(), and folly::detail::xlogStripFilenameRecursive().
constexpr const char* folly::xlogStripFilename | ( | const char * | filename, |
const char * | prefixes | ||
) |
Strip directory prefixes from a filename before using it in XLOG macros.
This is primarily used to strip off the initial project directory path for projects that invoke the compiler with absolute path names.
The filename argument is the filename to process. This is normally the contents of the FILE macro from the invoking file.
prefixes is a colon-separated list of directory prefixes to strip off if present at the beginning of the filename. The prefix list is searched in order, and only the first match found will be stripped.
e.g., xlogStripFilename("/my/project/src/foo.cpp", "/tmp:/my/project") would return "src/foo.cpp"
Definition at line 575 of file xlog.h.
References folly::detail::xlogStripFilenameRecursive().
Referenced by TEST().
|
static |
Definition at line 121 of file Crc32CombineDetail.cpp.
|
static |
Definition at line 128 of file Crc32CombineDetail.cpp.
|
static |
Definition at line 120 of file Crc32CombineDetail.cpp.
|
static |
Definition at line 126 of file Crc32CombineDetail.cpp.
FOLLY_STATIC_CTOR_PRIORITY_MAX hazptr_domain< std::atomic > folly::default_domain |
Global default domain defined in Hazptr.cpp
Definition at line 23 of file Hazptr.cpp.
Referenced by folly::hazptr_default_domain_helper< std::atomic >::get().
folly::std folly::Delimiter |
Referenced by folly::gen::lines(), folly::gen::detail::passthrough(), toAppendStrImpl(), and folly::gen::unsplit().
class folly::PackedSyncPtr folly::FOLLY_PACK_ATTR |
Referenced by folly::exception_wrapper::ExceptionPtr::as_int_().
auto const folly::foo |
Definition at line 49 of file LazyTest.cpp.
Referenced by shared_ptr_test(), TEST(), and TEST().
|
static |
The following works around the internal mutex for synchronized being private
This is horridly thread unsafe.
Definition at line 284 of file SynchronizedTest.cpp.
auto folly::globalCount = folly::lazy([] { return 0; }) |
Definition at line 48 of file LazyTest.cpp.
Referenced by TEST().
constexpr std::size_t folly::hardware_constructive_interference_size = 64 |
constexpr std::size_t folly::hardware_destructive_interference_size |
Definition at line 107 of file Align.h.
Referenced by folly::CoreRawAllocator< Stripes >::Allocator::allocate(), folly::detail::MPMCQueueBase< Derived< T, Atom, Dynamic > >::MPMCQueueBase(), folly::CachelinePadded< std::atomic< Version > >::paddingSize(), and folly::UnboundedQueue< T, SingleProducer, SingleConsumer, MayBlock, LgSegmentSize, LgAlign, Atom >::Segment::push_links().
constexpr initlist_construct_t folly::initlist_construct {} |
|
static |
Definition at line 221 of file Malloc.h.
Referenced by folly::fbvector< HTTPHeaderCode >::computePushBackCapacity(), folly::fbvector< T, Allocator >::emplace_back_aux(), folly::threadlocal_detail::StaticMetaBase::reallocate(), folly::fbvector< HTTPHeaderCode >::reserve_in_place(), folly::IOBuf::reserveSlow(), and folly::fbvector< HTTPHeaderCode >::shrink_to_fit().
Definition at line 26 of file TestSSLServer.cpp.
Referenced by TEST().
Definition at line 24 of file TestSSLServer.cpp.
Referenced by TEST().
Definition at line 25 of file TestSSLServer.cpp.
Referenced by TEST().
constexpr auto folly::kCpplibVer = 0 |
Definition at line 405 of file Portability.h.
constexpr LogLevel folly::kDefaultLogLevel = LogLevel::INFO |
Definition at line 102 of file LogLevel.h.
Referenced by initializeLoggerDB(), folly::LoggerDB::LoggerDB(), folly::LoggerDB::resetConfig(), and TEST().
constexpr bool folly::kHasUnalignedAccess = false |
Definition at line 29 of file Portability.h.
Referenced by folly::hash::SpookyHashV2::Hash128(), loadUnaligned(), partialLoadUnaligned(), folly::hash::SpookyHashV2::Short(), storeUnaligned(), and folly::hash::SpookyHashV2::Update().
constexpr size_t folly::kIovMax = UIO_MAXIOV |
Definition at line 39 of file SysUio.h.
Referenced by folly::AsyncSocket::performWrite(), pwritev(), and folly::fileutil_detail::wrapvFull().
constexpr bool folly::kIsArchAArch64 = 0 == 1 |
Definition at line 103 of file Portability.h.
constexpr bool folly::kIsArchAmd64 = 0 == 1 |
Definition at line 102 of file Portability.h.
Referenced by atomic_fetch_reset(), atomic_fetch_set(), folly::fibers::FiberImpl::deactivate(), encodeVarintSize(), TEST(), and TEST_F().
constexpr bool folly::kIsArchArm = 0 == 1 |
Definition at line 101 of file Portability.h.
constexpr bool folly::kIsArchPPC64 = 0 == 1 |
Definition at line 104 of file Portability.h.
constexpr auto folly::kIsBigEndian = !kIsLittleEndian |
Definition at line 280 of file Portability.h.
Referenced by folly::detail::EndianInt< T >::little().
constexpr auto folly::kIsDebug = true |
Definition at line 264 of file Portability.h.
Referenced by assume(), folly::test::ManualSchedule::beforeSharedAccess(), checkRunMode(), folly::EventBase::dcheckIsInEventBaseThread(), folly::LoggerDB::defaultInternalWarningImpl(), folly::detail::MemoryIdler::flushLocalMallocCaches(), folly::hazptr_local< M, Atom >::hazptr_local(), isLogLevelFatal(), main(), folly::chrono::coarse_steady_clock::now(), folly::test::ManualSchedule::post(), folly::hazptr_obj_linked< Atom >::release_ref(), folly::test::ManualSchedule::wait(), and folly::hazptr_local< M, Atom >::~hazptr_local().
constexpr auto folly::kIsGlibcxx = false |
Definition at line 373 of file Portability.h.
Referenced by message_for_terminate(), and message_for_terminate_with().
constexpr auto folly::kIsLibcpp = false |
Definition at line 379 of file Portability.h.
Referenced by message_for_terminate(), and message_for_terminate_with().
constexpr auto folly::kIsLibstdcpp = false |
Definition at line 385 of file Portability.h.
constexpr auto folly::kIsLinux = false |
Definition at line 361 of file Portability.h.
Referenced by asymmetricHeavyBarrier(), asymmetricLightBarrier(), folly::fibers::FiberImpl::deactivate(), getSystemLocalityInfo(), folly::AsyncServerSocket::handlerReady(), folly::AsyncServerSocket::setTosReflect(), and folly::detail::sysMembarrierAvailable().
constexpr auto folly::kIsLittleEndian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
Definition at line 278 of file Portability.h.
Referenced by folly::MicroLockCore::baseShift(), folly::detail::EndianInt< T >::big(), folly::json::firstEscapableInWord(), folly::symbolizer::ElfFile::init(), partialLoadUnaligned(), and folly::fbstring_core< char >::size().
constexpr auto folly::kIsMobile = false |
Definition at line 355 of file Portability.h.
Referenced by folly::parking_lot_detail::Bucket::bucketFor().
constexpr auto folly::kIsObjC = false |
Definition at line 349 of file Portability.h.
constexpr bool folly::kIsSanitize = false |
Definition at line 130 of file Portability.h.
Referenced by checkRunMode(), and TEST().
constexpr bool folly::kIsSanitizeAddress = false |
folly::kIsSanitizeAddress reports if folly was compiled with ASAN enabled. Note that for compilation units outside of folly that include folly/Portability.h, the value of kIsSanitizeAddress may be different from whether or not the current compilation unit is being compiled with ASAN.
Definition at line 118 of file Portability.h.
Referenced by expectAsanFailure(), and TEST().
constexpr bool folly::kIsSanitizeThread = false |
Definition at line 124 of file Portability.h.
Referenced by adjustReps(), annotate_benign_race_sized(), folly::detail::annotate_benign_race_sized_impl(), annotate_rwlock_acquired(), folly::detail::annotate_rwlock_acquired_impl(), annotate_rwlock_create(), folly::detail::annotate_rwlock_create_impl(), annotate_rwlock_create_static(), folly::detail::annotate_rwlock_create_static_impl(), annotate_rwlock_destroy(), folly::detail::annotate_rwlock_destroy_impl(), annotate_rwlock_released(), folly::detail::annotate_rwlock_released_impl(), folly::detail::sharedMutexAnnotationGuard(), and TEST().
constexpr auto folly::kIsWindows = false |
Definition at line 367 of file Portability.h.
Referenced by folly::netops::bind(), folly::AsyncServerSocket::bind(), TEST(), folly::netops::TEST(), and xlogIsDirSeparator().
|
static |
Definition at line 88 of file ThreadName.cpp.
Referenced by setThreadName().
constexpr size_t folly::kMaxVarintLength32 = 5 |
Variable-length integer encoding, using a little-endian, base-128 representation.
The MSb is set on all bytes except the last.
Details: https://developers.google.com/protocol-buffers/docs/encoding#varints
If you want to encode multiple values, GroupVarint (in GroupVarint.h) is faster and likely smaller. Maximum length (in bytes) of the varint encoding of a 32-bit value.
constexpr size_t folly::kMaxVarintLength64 = 10 |
Maximum length (in bytes) of the varint encoding of a 64-bit value.
Definition at line 50 of file Varint.h.
Referenced by folly::io::StreamCodec::doUncompress(), folly::test::TEST(), folly::io::test::TEST(), and folly::test::testVarint().
|
static |
Definition at line 204 of file Benchmark.cpp.
Referenced by metricReadable().
constexpr auto folly::kMicrosoftAbiVer = 0 |
Definition at line 397 of file Portability.h.
Referenced by folly::exception_wrapper::as_exception_or_null_(), and folly::exception_wrapper::ExceptionPtr::as_int_().
constexpr auto folly::kMscVer = 0 |
Definition at line 391 of file Portability.h.
Definition at line 22 of file TestSSLServer.cpp.
Referenced by TEST().
Definition at line 20 of file TestSSLServer.cpp.
Definition at line 21 of file TestSSLServer.cpp.
|
static |
Definition at line 190 of file Benchmark.cpp.
Referenced by readableTime().
|
static |
Definition at line 70 of file EventBase.cpp.
constexpr auto folly::loop_break = for_each_detail::LoopControl::BREAK |
Definition at line 97 of file Foreach.h.
Referenced by folly::for_each_detail::for_each_range_impl(), folly::detail::lock(), and TEST().
constexpr auto folly::loop_continue = for_each_detail::LoopControl::CONTINUE |
Definition at line 98 of file Foreach.h.
Referenced by folly::for_each_detail::for_each_tuple_impl(), folly::for_each_detail::invoke_returning_loop_control(), folly::detail::lock(), and TEST().
constexpr std::size_t folly::max_align_v = detail::max_align_v_::value |
Definition at line 90 of file Align.h.
Referenced by folly::SimpleAllocator::allocate(), folly::SimpleAllocator::allocateHard(), and TEST().
|
static |
Definition at line 50 of file AsyncSocket.cpp.
|
static |
Definition at line 50 of file AsyncServerSocket.cpp.
constexpr None folly::none {None::_secret::_token} |
Definition at line 87 of file Optional.h.
Referenced by folly::gen::detail::GroupByAdjacent< Selector >::Generator< Value, Source, ValueDecayed, Key, KeyDecayed >::apply(), folly::ConcurrentHashMap< KeyType, ValueType, HashFn, KeyEqual, Allocator, ShardBits, Atom, Mutex >::assign(), folly::ConcurrentHashMap< KeyType, ValueType, HashFn, KeyEqual, Allocator, ShardBits, Atom, Mutex >::assign_if_equal(), folly::coro::TimedWaitAwaitable< Awaitable >::await_resume(), proxygen::checkForProtocolUpgrade(), fizz::KeyScheduler::clearMasterSecret(), fizz::client::AsyncFizzClientT< SM >::connect(), fizz::client::AsyncFizzClientT< SM >::connectSuccess(), BogoTestClient::connectSuccess(), wangle::LRUInMemoryCache< K, V, MutexT >::convertToKeyValuePairs(), fizz::ReadRecordLayer::decodeHandshakeMessage(), fizz::server::AeadTokenCipher< AeadType, HkdfType >::decrypt(), fizz::server::AeadCookieCipher< AeadType, HkdfType >::decrypt(), fizz::server::AeadTicketCipher< AeadType, CodecType, HkdfType >::decrypt(), fizz::client::AsyncFizzClientT< SM >::deliverHandshakeError(), fizz::test::HandshakeTest::doClientHandshake(), fizz::test::HandshakeTest::doHandshake(), fizz::server::AeadTokenCipher< AeadType, HkdfType >::encrypt(), fizz::server::AeadTicketCipher< AeadType, CodecType, HkdfType >::encrypt(), fizz::detail::evpDecrypt(), folly::exception_wrapper::exception_wrapper(), fizz::server::CertManager::findCert(), fizz::client::test::AsyncFizzClientTest::fullHandshakeSuccess(), proxygen::HTTP2Codec::generateExHeader(), proxygen::HTTP2Codec::generateHeader(), proxygen::HTTP2Codec::generatePushPromise(), fizz::sm::generateTicket(), wangle::LRUInMemoryCache< K, V, MutexT >::get(), get_optional(), folly::settings::Snapshot::getAsString(), proxygen::SecondaryAuthManager::getCertId(), fizz::sm::getCertificateRequest(), fizz::sm::getClockSkew(), folly::ssl::OpenSSLCertUtils::getCommonName(), fizz::sm::getCookieState(), fizz::EncryptedReadRecordLayer::getDecryptedBuf(), fizz::sm::getEarlyDataParams(), fizz::getExtension(), wangle::Acceptor::getFizzPeeker(), fizz::server::getHrrGroup(), fizz::sm::getHrrKeyExchangers(), TestPriorityAdapter::getHTTPPriority(), proxygen::HTTPSession::getHTTPPriority(), folly::ssl::OpenSSLCertUtils::getIssuer(), folly::IPAddressV6::getMacAddressFromEUI64(), folly::IPAddressV6::getMacAddressFromLinkLocal(), proxygen::HTTPMessage::getMethod(), proxygen::SecondaryAuthManager::getPeerCert(), fizz::client::SynchronizedLruPskCache::getPsk(), fizz::client::BasicPskCache::getPsk(), fizz::client::FizzClientContext::getPsk(), fizz::detail::getRequestedSchemes(), fizz::sm::getResumptionState(), folly::settings::getSettingsMeta(), proxygen::PerfectIndexMap< typename T::TKey, T::TOtherKey, T::TNoneKey, T::Hash, T::TAllowDuplicates, T::TCaseInsensitive >::getSingleOrNone(), folly::ssl::OpenSSLCertUtils::getSubject(), proxygen::SPDYCodec::getVersion(), fizz::sm::handleCertMsg(), fizz::sm::handleEarlyAppWrite(), fizz::client::AsyncFizzClientT< SM >::handleEarlyReject(), fizz::server::detail::handleInvalidEvent(), fizz::client::detail::handleInvalidEvent(), proxygen::spdy::httpToSpdySettingsId(), fizz::sm::ignoreEarlyAppWrite(), folly::dynamicconverter_detail::Transformer< T, It >::increment(), proxygen::HeaderDecodeInfo::init(), folly::compression::instructionsOverride(), TryFromStringTest::ipInOutProvider(), wangle::FilePersistenceLayer< K, V >::load(), fizz::server::negotiate(), fizz::sm::negotiateGroup(), fizz::extensions::TokenBindingServerExtension::negotiateVersion(), fizz::sm::negotiateVersion(), fizz::client::AsyncFizzClientT< SM >::ActionMoveVisitor::operator()(), proxygen::HTTP2Codec::parseContinuation(), proxygen::HTTP2Codec::parseExHeaders(), proxygen::http2::parseExHeaders(), proxygen::HTTP2Codec::parseHeaders(), proxygen::http2::parseHeaders(), proxygen::parseHTTPDateTime(), proxygen::HTTP2Codec::parsePushPromise(), wangle::PeekingAcceptorHandshakeHelper::peekError(), PerfectIndexMapGetCodeBench(), PerfectIndexMapGetStringBench(), fizz::client::ClientStateMachine::processSocketData(), fizz::server::ServerStateMachine::processSocketData(), wangle::TLSCredProcessor::processTLSTickets(), fizz::PlaintextReadRecordLayer::read(), fizz::EncryptedReadRecordLayer::read(), wangle::SerialClientDispatcher< wangle::Pipeline, folly::Req, Resp >::read(), fizz::ReadRecordLayer::readEvent(), runRemoteUnlock(), proxygen::HTTPMessage::setPriority(), fizz::test::HandshakeTest::setupResume(), fizz::test::HandshakeTest::setupResumeWithHRR(), proxygen::spdy::spdyToHttpSettingsId(), wangle::UnencryptedAcceptorHandshakeHelper::start(), proxygen::stringToMethod(), TEST(), fizz::server::test::TEST(), test(), TEST(), folly::io::test::TEST(), fizz::server::test::TEST_F(), fizz::test::TEST_F(), TEST_F(), fizz::client::test::TEST_F(), folly::io::test::TEST_P(), folly::ssl::OpenSSLCertUtils::toString(), folly::UnboundedBlockingQueue< T >::try_take_for(), folly::LifoSemMPMCQueue< T, kBehavior >::try_take_for(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::try_take_for(), folly::ThreadPoolExecutor::StoppedThreadQueue::try_take_for(), folly::io::Codec::type(), UnorderedMapGetBench(), fizz::ExportedAuthenticator::validate(), fizz::sm::validateAcceptedEarly(), fizz::sm::validatePsk(), fizz::extensions::Validator::validateTokenBinding(), proxygen::SecondaryAuthManager::verifyContext(), proxygen::http2::writeAltSvc(), proxygen::http2::writeCertificate(), proxygen::http2::writeCertificateRequest(), proxygen::http2::writeContinuation(), proxygen::http2::writeData(), proxygen::http2::writeGoaway(), proxygen::http2::writePing(), proxygen::http2::writePushPromise(), proxygen::http2::writeRstStream(), proxygen::http2::writeSettings(), proxygen::http2::writeSettingsAck(), proxygen::http2::writeWindowUpdate(), and folly::io::StreamCodec::~StreamCodec().
constexpr presorted_t folly::presorted {} |
Definition at line 311 of file Utility.h.
Referenced by merge(), and folly::TDigest::merge().
folly::Indestructible<rcu_domain<RcuTag>*> folly::rcu_default_domain_ |
Referenced by rcu_default_domain().
std::enable_if< std::is_integral<Src>::value && IsSomeString<Tgt>::value && sizeof(Src) < 4>::typetoAppend(Src value, Tgt* result) { typedef typename std::conditional<std::is_signed<Src>::value, int64_t, uint64_t>:: type Intermediate; toAppend<Tgt>static_cast<Intermediate>value), result);}template <class Src>typename std::enable_if< std::is_integral<Src>::value && sizeof(Src) < 4 && !std::is_same<Src, char>::value, size_t>::typeestimateSpaceNeeded(Src value) { typedef typename std::conditional<std::is_signed<Src>::value, int64_t, uint64_t>:: type Intermediate; return estimateSpaceNeeded(static_cast<Intermediate>value));}template <class Tgt, class Src>typename std::enable_if< std::is_enum<Src>::value && IsSomeString<Tgt>::value>::typetoAppend(Src value, Tgt* result) { toAppend( static_cast<typename std::underlying_type<Src>::type>value), result);}template <class Src>typename std::enable_if<std::is_enum<Src>::value, size_t>::typeestimateSpaceNeeded(Src value) { return estimateSpaceNeeded( static_cast<typename std::underlying_type<Src>::type>value));}namespace detail {constexpr int kConvMaxDecimalInShortestLow = -6;constexpr int kConvMaxDecimalInShortestHigh = 21;} template <class Tgt, class Src>typename std::enable_if< std::is_floating_point<Src>::value && IsSomeString<Tgt>::value>::typetoAppend( Src value, Tgt* result, double_conversion::DoubleToStringConverter::DtoaMode mode, unsigned int numDigits) { using namespace double_conversion; DoubleToStringConverter conv( DoubleToStringConverter::NO_FLAGS, "Infinity", "NaN", 'E', detail::kConvMaxDecimalInShortestLow, detail::kConvMaxDecimalInShortestHigh, 6, 1); char buffer[256]; StringBuilder builder(buffer, sizeof(buffer)); switch (mode) { case DoubleToStringConverter::SHORTEST: conv.ToShortest(value, &builder); break; case DoubleToStringConverter::SHORTEST_SINGLE: conv.ToShortestSingle(static_cast<float>value), &builder); break; case DoubleToStringConverter::FIXED: conv.ToFixed(value, int(numDigits), &builder); break; default: CHECK(mode == DoubleToStringConverter::PRECISION); conv.ToPrecision(value, int(numDigits), &builder); break; } const size_t length = size_t(builder.position()); builder.Finalize(); result->append(buffer, length);}template <class Tgt, class Src>typename std::enable_if< std::is_floating_point<Src>::value && IsSomeString<Tgt>::value>::typetoAppend(Src value, Tgt* result) { toAppend( value, result, double_conversion::DoubleToStringConverter::SHORTEST, 0);}template <class Src>typename std::enable_if<std::is_floating_point<Src>::value, size_t>::typeestimateSpaceNeeded(Src value) { constexpr int kMaxMantissaSpace = double_conversion::DoubleToStringConverter::kBase10MaximalLength + 1; constexpr int kMaxExponentSpace = 2 + 3; static const int kMaxPositiveSpace = std::max({ kMaxMantissaSpace + kMaxExponentSpace, kMaxMantissaSpace - detail::kConvMaxDecimalInShortestLow, detail::kConvMaxDecimalInShortestHigh, }); return size_t( kMaxPositiveSpace + (value < 0 ? 1 : 0)); }template <class Src>struct HasLengthEstimator : std::false_type {};template <class Src>constexpr typename std::enable_if< !std::is_fundamental<Src>::value && !IsSomeString<Src>::value && !std::is_convertible<Src, const char*>::value && !std::is_convertible<Src, StringPiece>::value && !std::is_enum<Src>::value && !HasLengthEstimator<Src>::value, size_t>::typeestimateSpaceNeeded(const Src&) { return sizeof(Src) + 1; }namespace detail {template <class Tgt>typename std::enable_if<IsSomeString<Tgt>::value, size_t>::typeestimateSpaceToReserve(size_t sofar, Tgt*) { return sofar;}template <class T, class... Ts>size_t estimateSpaceToReserve(size_t sofar, const T& v, const Ts&... vs) { return estimateSpaceToReserve(sofar + estimateSpaceNeeded(v), vs...);}template <class... Ts>void reserveInTarget(const Ts&... vs) { getLastElement(vs...)-> folly::reserve(estimateSpaceToReserve(0, vs...)) |
All small signed and unsigned integers to string go through 32-bit types int32_t and uint32_t, respectively.
Definition at line 792 of file Conv.h.
Referenced by folly::fibers::TaskIterator< T >::awaitNextResult(), folly::threadlocal_detail::StaticMetaBase::erase(), folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=(), and folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=().
constexpr detail::Sig<Sig> const folly::sig = {} |
Pseudo-function template handy for disambiguating function overloads.
For example, given: struct S { int property() const; void property(int); };
You can get a member function pointer to the first overload with: folly::sig<int()const>(&S::property);
This is arguably a nicer syntax that using the built-in static_cast
: static_cast<int (S::*)() const>(&S::property);
sig
is also more permissive than static_cast
about const
. For instance, the following also works: folly::sig<int()>(&S::property);
The above is permitted
Definition at line 1165 of file Poly.h.
Referenced by folly::Subprocess::Options::chdir(), fizz::sm::getCertificateRequest(), fizz::ExportedAuthenticator::makeAuthenticator(), folly::Subprocess::prepareChild(), runChild(), fizz::test::TEST_F(), fizz::testing::TEST_P(), and fizz::test::TYPED_TEST().
|
static |
Definition at line 27 of file GlobalShutdownSocketSet.cpp.
Referenced by folly::LoggerDB::get(), getCPUExecutor(), getIOExecutor(), setCPUExecutor(), setIOExecutor(), folly::detail::singletonThrowGetInvokedAfterDestruction(), and TEST().
const AsyncSocketException folly::socketClosedLocallyEx(AsyncSocketException::END_OF_FILE,"socket closed locally") |
Referenced by folly::AsyncSocket::closeNow().
const AsyncSocketException folly::socketShutdownForWritesEx(AsyncSocketException::END_OF_FILE,"socket shutdown for writes") |
Referenced by folly::AsyncSocket::shutdownWriteNow().
folly::std folly::T |
Referenced by folly::fibers::FiberManager::add(), addBenchmark(), folly::FutureExecutor< ExecutorImpl >::addFuture(), folly::fibers::TaskIterator< T >::addTask(), folly::fibers::FiberManager::addTaskFuture(), aFunction(), folly::CxxHugePageAllocator< T >::allocate(), ExpectingAlloc< T >::allocate(), folly::SysAllocator< T >::allocate(), folly::f14::SwapTrackingAlloc< T >::allocate(), folly::AlignedSysAllocator< T, Align >::allocate(), folly::f14::GenericAlloc< T >::allocate(), folly::CxxAllocatorAdaptor< T, Inner >::allocate(), allocate_unique(), allocationBytesForOverAligned(), folly::SomeClass::aMethod(), as_const(), folly::detail::as_sorted(), folly::MemoryMapping::asRange(), folly::fbvector< HTTPHeaderCode >::assign(), folly::SomeClass::aStaticMethod(), aStdFunction(), folly::MemoryMapping::asWritableRange(), folly::symbolizer::ElfFile::at(), folly::coro::AwaitableReady< T >::await_resume(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::binarySearchPosition(), bitReverse(), folly::Bits< T, Traits >::blockCount(), folly::hazptr_obj_base_linked< NodeAuto< Atom >, Atom >::call_push_links(), folly::TypedIOBuf< T >::cast(), folly::Bits< T, Traits >::clear(), collect(), collectAllSemiFuture(), collectAny(), collectAnyWithoutException(), collectN(), folly::FlatCombining< FcSimpleExample< Mutex, Atom >, Mutex, Atom >::combiningSession(), folly::hash::commutative_hash_combine_generic(), complexBenchmark(), folly::fbvector< HTTPHeaderCode >::computeInsertCapacity(), folly::fbvector< HTTPHeaderCode >::computePushBackCapacity(), constexpr_add_overflow_clamped(), constexpr_ceil(), constexpr_find_first_set(), constexpr_find_last_set(), constexpr_log2(), folly::detail::constexpr_log2_(), folly::detail::constexpr_log2_ceil_(), constexpr_max(), constexpr_min(), constexpr_pow(), constexpr_sub_overflow_clamped(), folly::detail::fixedstring::constexpr_swap(), folly::test::TupleTo< std::tuple<>, std::tuple<> >::convert(), folly::test::TupleTo2< TemplateSeq< std::size_t, Ns... > >::convert(), folly::DynamicConverter< T, typename std::enable_if< std::is_enum< T >::value >::type >::convert(), folly::settings::detail::convertOrConstruct(), folly::replaceable_detail::copy_ctor_mixin< T, true >::copy_ctor_mixin(), folly::futures::detail::coreDetachPromiseMaybeWithResult(), folly::detail::StaticSingletonManager::create(), folly::detail::createGlobal(), folly::detail::SingletonHolder< T >::createInstance(), folly::fbvector< T, Allocator >::Impl::D_allocate(), folly::fibers::Fiber::LocalData::dataBufferDestructor(), folly::fibers::Fiber::LocalData::dataCopyConstructor(), folly::fibers::Fiber::LocalData::dataHeapDestructor(), folly::io::compression::detail::dataStartsWithLE(), folly::CxxHugePageAllocator< T >::deallocate(), folly::f14::SwapTrackingAlloc< T >::deallocate(), folly::f14::GenericAlloc< T >::deallocate(), folly::AtomicStruct< folly::IndexedMemPool::TaggedPtr, Atom >::decode(), folly::replaceable_detail::default_and_move_ctor_mixin< T, true, true >::default_and_move_ctor_mixin(), folly::replaceable_detail::default_and_move_ctor_mixin< T, true, false >::default_and_move_ctor_mixin(), folly::replaceable_detail::default_and_move_ctor_mixin< T, false, true >::default_and_move_ctor_mixin(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::deferSettingRootSize(), folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::dereference(), folly::fbvector< HTTPHeaderCode >::do_real_insert(), folly::expected_detail::doEmplaceAssign(), doNotOptimizeAway(), folly::dynamic::dynamic(), folly::Try< T >::emplace(), folly::Replaceable< T >::emplace(), folly::fbvector< T, Allocator >::emplace_back_aux(), folly::AtomicStruct< folly::IndexedMemPool::TaggedPtr, Atom >::encode(), folly::detail::SingleElementQueue< T, Atom >::enqueue(), folly::detail::SingleElementQueue< T, Atom >::enqueueImpl(), folly::fbvector< HTTPHeaderCode >::erase(), estimateSpaceNeeded(), folly::EventBase::EventBase(), non_atomic< T >::exchange(), exchange(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::exchange(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::fetch_add(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::fetch_and(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::fetch_or(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::fetch_sub(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::fetch_xor(), fGen(), folly::Future< T >::filter(), folly::detail::SignedValueHandler< T, true >::finalize(), findFirstSet(), findLastSet(), folly::json::firstEscapableInWord(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::forceInsert(), from_eptr(), folly::Future< folly::folly::Unit >::Future(), folly::Future< T >::Future(), folly::futures::detail::FutureBase< T >::FutureBase(), PThreadGetSpecific< T >::get(), folly::EventBaseLocal< T >::get(), folly::rvalue_reference_wrapper< T >::get(), folly::PackedSyncPtr< T >::get(), folly::DiscriminatedPtr< Types >::get(), folly::fibers::Fiber::LocalData::get(), folly::ThreadLocalPtr< SubscriberMap >::get(), folly::DiscriminatedPtr< Types >::get_nothrow(), folly::hazptr_holder< Atom >::get_protected(), get_ptr(), folly::detail::shared_ptr_internals::get_shared_ptr(), folly::BlockingQueue< folly::CPUThreadPoolExecutor::CPUTask >::getNumPriorities(), folly::EventBaseLocal< T >::getOrCreate(), folly::EventBaseLocal< T >::getOrCreateFn(), folly::detail::HistogramBuckets< T, BucketT >::getPercentileEstimate(), folly::coro::detail::TaskPromise< T >::getResult(), folly::fibers::Fiber::LocalData::getSlow(), folly::observer::Observer< T >::getSnapshot(), folly::Singleton< folly::observer_detail::ObserverManager >::getTeardownFunc(), folly::AsyncTransportWrapper::getUnderlyingTransport(), folly::SingletonThreadLocal< T, Tag, Make, TLTag >::getWrapper(), folly::hash::hash_combine_generic(), hazptr_domain_push_retired(), AnnotatedAtomicCounter< T >::incBug(), folly::Indestructible< T >::Indestructible(), folly::fbvector< T, Allocator >::Impl::init(), folly::fbvector< HTTPHeaderCode >::insert(), folly::UnboundedQueue< T, SingleProducer, SingleConsumer, MayBlock, LgSegmentSize, LgAlign, Atom >::Entry::itemPtr(), launder(), folly::LeakySingleton< T, Tag >::LeakySingleton(), folly::Tearable< T >::load(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::load(), loadUnaligned(), folly::fibers::FiberManager::local(), folly::fibers::local(), folly::fibers::FiberManager::localThread(), folly::Singleton< folly::observer_detail::ObserverManager >::make_mock(), folly::LeakySingleton< T, Tag >::make_mock(), make_optional(), make_replaceable(), make_unique(), folly::fbvector< HTTPHeaderCode >::make_window(), folly::futures::detail::makeCoreCallbackState(), makeTryWith(), makeUnpredictable(), folly::detail::mallctlHelper(), folly::futures::map(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::mergeDown(), nextPowTwo(), folly::Future< T >::onError(), PThreadGetSpecific< T >::OnThreadExit(), folly::pushmi::concepts::detail::Not< T >::operator bool(), folly::pushmi::concepts::detail::And< T, U >::operator bool(), folly::pushmi::concepts::detail::Or< T, U >::operator bool(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator T(), folly::pushmi::concepts::detail::Not< T >::operator!(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator&=(), folly::detail::DefaultMake< T >::operator()(), folly::pushmi::for_each_fn::identity::operator()(), folly::pushmi::reduce_fn::identity::operator()(), folly::pushmi::pipe_fn::operator()(), folly::ApplyInvoke::operator()(), folly::pushmi::detail::id_fn::operator()(), folly::dptr_detail::ApplyVisitor1< 1, V, R, T, Types... >::operator()(), folly::dptr_detail::ApplyConstVisitor1< 1, V, R, T, Types... >::operator()(), folly::detail::apply_tuple::Construct< T >::operator()(), std::hash< TestStruct >::operator()(), folly::DefaultWeightFn< T >::operator()(), folly::pushmi::detail::get_fn< T >::on_value_impl::operator()(), folly::Hash::operator()(), TestHasher::operator()(), folly::allocator_delete< Alloc >::operator()(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator++(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator+=(), folly::expected_detail::expected_detail_ExpectedHelper::operator,(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator--(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator-=(), folly::pushmi::detail::opt< std::tuple< std::decay_t< TN >... > >::operator=(), folly::Try< T >::operator=(), folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=(), folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=(), folly::replaceable_detail::move_assignment_mixin< T, true >::operator=(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator=(), folly::replaceable_detail::copy_assignment_mixin< T, true >::operator=(), folly::Future< T >::operator=(), folly::padded::Node< T, NS, typename detail::NodeValid< T, NS >::type >::operator==(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator^=(), folly::test::DeterministicAtomicImpl< T, Schedule, Atom >::operator|=(), folly::pushmi::detail::opt< std::tuple< std::decay_t< TN >... > >::opt(), folly::padded::Node< T, NS, typename detail::NodeValid< T, NS >::type >::paddingBytes(), folly::CachelinePadded< std::atomic< Version > >::paddingSize(), parseTo(), partialLoadUnaligned(), poly_cast(), poly_move(), popcount(), folly::io::compression::detail::prefixToStringLE(), prevPowTwo(), folly::FlatCombining< FcSimpleExample< Mutex, Atom >, Mutex, Atom >::processReq(), folly::pushmi::detail::opt< std::tuple< std::decay_t< TN >... > >::ptr(), folly::UnboundedQueue< T, SingleProducer, SingleConsumer, MayBlock, LgSegmentSize, LgAlign, Atom >::Segment::push_links(), folly::UnboundedQueue< T, SingleProducer, SingleConsumer, MayBlock, LgSegmentSize, LgAlign, Atom >::Entry::putItem(), folly::detail::qfind_first_byte_of_sse42(), folly::test::detail::RandomList(), folly::detail::rawOverAlignedImpl(), rcu_barrier(), rcu_retire(), folly::io::detail::CursorBase< Cursor, const IOBuf >::read(), folly::io::detail::CursorBase< Cursor, const IOBuf >::readSlow(), reduce(), folly::Future< T >::reduce(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::regularInsert(), folly::ThreadLocalPtr< SubscriberMap >::release(), relinquish(), folly::fbvector< HTTPHeaderCode >::relocate_move_or_memcpy(), folly::Replaceable< T >::Replaceable(), folly::fbvector< HTTPHeaderCode >::reserve(), folly::fbvector< HTTPHeaderCode >::reserve_in_place(), folly::hazptr_holder< Atom >::reset(), folly::ThreadLocalPtr< SubscriberMap >::reset(), folly::fbvector< HTTPHeaderCode >::resize(), folly::hazptr_domain< DeterministicAtomic >::retire(), folly::futures::detail::retrying(), folly::futures::detail::retryingImpl(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::return_(), folly::AtomicIntrusiveLinkedList< folly::fibers::Fiber,&folly::fibers::Fiber::nextRemoteReady_ >::reverse(), rref(), runArithmeticBench(), runMultiBitTest64(), runMultiBitTest8(), runSignedMultiBitTest8(), runSimpleTest64(), runSimpleTest8(), folly::rvalue_reference_wrapper< T >::rvalue_reference_wrapper(), folly::fbvector< HTTPHeaderCode >::S_copy_n(), folly::fbvector< HTTPHeaderCode >::S_uninitialized_copy_bits(), folly::fbvector< HTTPHeaderCode >::S_uninitialized_fill_n(), folly::TypedIOBuf< T >::sdiv(), folly::symbolizer::Dwarf::Section::Section(), folly::Random::secureRandom(), folly::detail::TupleSelect< TemplateSeq< std::size_t, Ns... > >::select(), folly::SemiFuture< T >::SemiFuture(), folly::Bits< T, Traits >::set(), folly::settings::detail::set(), folly::hazptr_obj_base< Node, Atom >::set_reclaim(), folly::AsyncSocket::setSockOpt(), folly::SharedPromise< folly::folly::Unit >::setValue(), folly::Promise< folly::folly::Unit >::setValue(), folly::fbvector< HTTPHeaderCode >::shrink_to_fit(), folly::detail::SingletonHolder< T >::singleton(), folly::Singleton< folly::observer_detail::ObserverManager >::Singleton(), folly::TypedIOBuf< T >::smul(), someFuture(), folly::Indestructible< T >::Storage::Storage(), folly::Tearable< T >::store(), folly::detail::type< T >::store(), storeUnaligned(), folly::detail::EndianInt< T >::swap(), folly::UnboundedBlockingQueue< T >::take(), folly::LifoSemMPMCQueue< T, kBehavior >::take(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::take(), folly::DynamicBoundedQueue< T, SingleProducer, SingleConsumer, MayBlock, LgSegmentSize, LgAlign, WeightFn, Atom >::takeCredit(), folly::fibers::TaskIterator< T >::TaskIterator(), folly::test::TEST(), TEST(), testIsRelocatable(), folly::Future< T >::then(), p1054::then_execute(), folly::ThreadLocal< std::queue< folly::Function > >::ThreadLocal(), folly::detail::to_exception_arg_(), to_ordering(), toAppend(), toAppendStrImpl(), folly::Try< folly::folly::Unit >::Try(), folly::Try< T >::Try(), folly::hazptr_holder< Atom >::try_protect(), folly::UnboundedBlockingQueue< T >::try_take_for(), folly::LifoSemMPMCQueue< T, kBehavior >::try_take_for(), folly::PriorityLifoSemMPMCQueue< T, kBehavior >::try_take_for(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::trylockNode(), folly::detail::RingBufferSlot< T, Atom >::tryRead(), folly::io::detail::CursorBase< Cursor, const IOBuf >::tryRead(), p1054::twoway_execute(), unorderedReduce(), folly::StampedPtr< T >::unpackPtr(), folly::Try< T >::value(), folly::Optional< NamedGroup >::value_or(), folly::symbolizer::ElfFile::valueAt(), folly::detail::RingBufferSlot< T, Atom >::waitAndTryRead(), folly::futures::detail::waitViaImpl(), folly::ProducerConsumerQueue< T >::write(), folly::io::detail::Writable< Appender >::write(), folly::io::QueueAppender::write(), folly::io::QueueAppender::writeSlow(), folly::coro::detail::BlockingWaitPromise< T & >::yield_value(), folly::AtomicLinkedList< T >::~AtomicLinkedList(), folly::replaceable_detail::dtor_mixin< T, true, false >::~dtor_mixin(), and folly::detail::SingleElementQueue< T, Atom >::~SingleElementQueue().
constexpr Unit folly::unit {} |
Definition at line 45 of file Unit.h.
Referenced by bench(), folly::observer::CallbackHandle::CallbackHandle(), doubleBatchInnerDispatch(), doubleBatchOuterDispatch(), folly::detail::CheckTrailingSpace::operator()(), folly::detail::ReturnUnit< Error >::operator()(), runBench(), folly::futures::detail::stealDeferredExecutorsVariadic(), TEST(), folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper::then_(), folly::IPAddressV4::trySetFromBinary(), and folly::IPAddressV6::trySetFromBinary().
constexpr unsorted_t folly::unsorted {} |