include or backport: * std::invoke * std::invoke_result * std::invoke_result_t * std::is_invocable * std::is_invocable_v * std::is_invocable_r * std::is_invocable_r_v * std::is_nothrow_invocable * std::is_nothrow_invocable_v * std::is_nothrow_invocable_r * std::is_nothrow_invocable_r_v

Namespaces

Name

Description

array_detail

Implementation helpers for make_array and make_array_with.

async_tracing

Implementation details.

bind

READ ME: The docs for this library are in Bind.md.

bititerator_detail

Implementation details for BitIterator.

bser

BSER binary serialization for dynamic values.

bskip_detail

Internal implementation details for ConcurrentBSkipList.

channels

Sender/receiver channel primitives for asynchronous value streams.

chrono

Time‐related wrappers and clock utilities.

compression

Compression and decompression codecs over IOBufs.

coro

Coroutine primitives and combinators.

crypto

Cryptographic hashing primitives.

detail_tag_invoke_fn

Implementation details of the tag_invoke customization‐point machinery.

dptr_detail

Implementation details.

dynamic_detail

Implementation details for dynamic.

dynamicconverter_detail

Implementation details for DynamicConverter and DynamicConstructor.

exception_tracer

Facilities for capturing and stacking exception stack traces.

expected_detail

Implementation details for folly::Expected.

experimental

Namespace for experimental Folly components.

ext

Extension namespace for library authors, a public analog of folly::detail.

external

Vendored third‐party code adapted for use in Folly.

f14

Implementation details for the F14 hash table family.

fallback

A fallback implementation used when the standard trait is unavailable.

fbstring_detail

Implementation details for fbstring.

fibers

Lightweight cooperative userspace threads (fibers) and related primitives.

fileops

Portable wrappers and imports for file‐descriptor operations.

fileutil_detail

Implementation details.

find_fixed_detail

Implementation details for folly::findFixed.

for_each_detail

The user should return loop_break and loop_continue if they want to iterate in such a way that they can preemptively stop the loop and break out when certain conditions are met.

format_value

Utilities for all format value specializations.

fs

Portable filesystem imports selecting the available <filesystem> backend.

futures

Futures‐based asynchronous programming primitives.

gen

Lazy sequence generators and pipeline operators.

gflags

Minimal stand‐in for the gflags namespace when gflags is unavailable.

hash

Hashing algorithms and helpers.

invoke_detail

Implementation details of the folly invocation traits.

io

Cursor and queue utilities for reading and writing IOBuf chains.

json

JSON parsing and serialization utilities.

jsonschema

JSON Schema (draft v4) validation utilities.

libcpp_detail

Implementation details for libc++ bitset support.

logging

Folly's logging library.

memory

Memory management utilities.

moveonly_

Internal namespace hosting the copy/move control base types.

netops

Cross‐platform socket operation wrappers.

numbers

numbers

observer

Folly's observer library.

observer_detail

Implementation details.

padded

Utilities for storing data aligned on block (possibly cache‐line) boundaries, with optional padding.

pmr

Aliases that use a polymorphic allocator.

poly

Interfaces and helpers for the Poly type‐erasure utility.

portability

Portability shims for platform‐specific system interfaces.

recordio_helpers

Low‐level helpers exposing the RecordIO record format.

replaceable_detail

Implementation details for Replaceable; not part of the public API.

settings

Runtime configuration settings framework.

shared_mutex_detail

Implementation details for SharedMutex; not part of the public API.

simd

SIMD algorithms and utilities.

small_vector_policy

Policies that customize the behavior of folly::small_vector.

ssl

SSL and TLS helpers built on OpenSSL.

stable_radix_sort_detail

Implementation details for the stable radix sort.

stable_radix_sort_keys

Stable LSD (Least Significant Digit) Radix Sort

symbolizer

Stack trace capture and symbolization utilities.

test

Testing utilities.

threadlocal_detail

Implementation details.

traits_detail

There is a bug in libstdc++, libc++, and MSVC's STL that causes it to ignore unused template parameter arguments in template aliases and does not cause substitution failures. This defect has been recorded here: http://open‐std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558.

traits_detail_IsEqualityComparable

Implementation namespace for the IsEqualityComparable trait.

traits_detail_IsLessThanComparable

Implementation namespace for the IsLessThanComparable trait.

Types

Name

Description

AccessModeStrict

Tag selecting strict access mode for thread‐local storage.

AccessSpreader

AccessSpreader arranges access to a striped data structure in such a way that concurrently executing threads are likely to be accessing different stripes. It does NOT guarantee uncontended access. Your underlying algorithm must be thread‐safe without spreading, this is merely an optimization. AccessSpreader::current(n) is typically much faster than a cache miss (12 nanos on my dev box, tested fast in both 2.6 and 3.2 kernels).

AlignedSysAllocator

AlignedSysAllocator

AllocatorHasDefaultObjectConstruct

AllocatorHasDefaultObjectConstruct

AllocatorHasDefaultObjectDestroy

AllocatorHasDefaultObjectDestroy

AllocatorHasTrivialDeallocate

AllocatorHasTrivialDeallocate

AnnotatedLockGuard

A scoped lock for any capability‐annotated mutex.

AnnotatedMutex

A std::mutex wrapper carrying the capability("mutex") attribute.

ApplyInvoke

Callable that invokes a function with the elements of a tuple as arguments.

Arena

Arena that allocates memory in blocks and frees it all at destruction.

ArenaAllocatorTraits

Simple arena: allocate memory which gets freed when the arena gets destroyed.

AsciiCaseInsensitive

Check if two ascii characters are case insensitive equal. The difference between the lower/upper case characters are the 6‐th bit. We also check they are alpha chars, in case of xor = 32.

AsciiCaseSensitive

Case‐sensitive equality comparator for ASCII characters.

AsyncBase

Generic C++ interface around Linux IO(io_submit, io_uring)

AsyncBaseOp

An AsyncBaseOp represents a pending operation. You may set a notification callback or you may use this class's methods directly.

AsyncBaseQueue

Wrapper around AsyncBase that allows you to schedule more requests than the AsyncBase's object capacity. Other requests are queued and processed in a FIFO order.

AsyncDetachFdCallback

Receives the result of detaching a file descriptor from a socket.

AsyncFdSocket

Intended for use with Unix sockets. Unlike regular AsyncSocket: ‐ Can send FDs via writeChainWithFds using socket ancillary data (see man cmsg). ‐ Whenever handling regular reads, concurrently attempts to receive FDs included in incoming ancillary data. Groups of received FDs are enqueued to be retrieved via popNextReceivedFds. ‐ The "read ancillary data" and "sendmsg params" callbacks are built‐in are NOT customizable.

AsyncFdSocketSequenceRoundtripTest_WithDataSize_Test

Test fixture friendship declaration generated by the GTest macro.

AsyncFileWriter

An implementation of folly::AsyncLogWriter that writes log messages into a file.

AsyncIO

C++ interface around Linux Async IO.

AsyncIOOp

A pending operation backed by the Linux io_submit interface.

AsyncIoUringSocket

AsyncIoUringSocketFactory

Creates AsyncIoUringSocket instances and reports io_uring support.

AsyncLogWriter

An abstract LogWriter implementation that provides functionality for asynchronous IO operations. Users can subclass this class and provide their own IO operation implementation by overriding performIO method. This class will automatically manage incoming log messages and call the method in appropriate time.

AsyncPipeReader

Read from a pipe in an async manner.

AsyncPipeWriter

Write to a pipe in an async manner.

AsyncReader

Interface for the read side of an asynchronous transport.

AsyncSSLSocket

A class for performing asynchronous I/O on an SSL connection.

AsyncSSLSocketConnector

Connector that drives the SSL handshake for an AsyncSSLSocket.

AsyncServerSocket

AsyncServerSocket is a listening socket that asynchronously informs a callback whenever a new connection has been accepted.

AsyncSignalHandler

A handler to receive notification about POSIX signals.

AsyncSocket

An asynchronous socket.

AsyncSocketBase

Base interface for asynchronous sockets bound to an event base.

AsyncSocketException

Exception thrown by folly asynchronous socket operations.

AsyncSocketObserverContainer

Container of observers attached to an AsyncSocket.

AsyncSocketObserverInterface

Observer of socket events.

AsyncSocketTransport

Abstract asynchronous transport backed by a socket.

AsyncStackFrame

Represents a frame in an async stack trace.

AsyncStackRoot

A stack‐root represents the context of an event loop that is running some asynchronous work. The current async operation that is being executed by the event loop (if any) is pointed to by the 'topFrame'.

AsyncTimeout

AsyncTimeout is used to asynchronously wait for a timeout to occur.

AsyncTransport

AsyncTransport defines an asynchronous API for bidirectional streaming I/O.

AsyncTransportCertificate

Generic interface applications may implement to convey self or peer certificate related information.

AsyncUDPServerSocket

UDP server socket

AsyncUDPSocket

UDP socket

AsyncWriter

Interface for the write side of an asynchronous transport.

AtFork

AtFork

AtForkList

AtForkList

AtomicCoreCachedSharedPtr

This class creates core‐local caches for a given shared_ptr, to mitigate contention when acquiring/releasing it.

AtomicHashArray

Fixed‐size, lock‐free hash array and building block for AtomicHashMap.

AtomicHashArrayLinearProbeFcn

Linear probing strategy for AtomicHashArray.

AtomicHashArrayQuadraticProbeFcn

Quadratic probing strategy for AtomicHashArray.

AtomicHashMap

Lock‐free, growable hash map built on top of AtomicHashArray.

AtomicHashMapFullError

Thrown when insertion fails due to running out of space for submaps.

AtomicIntrusiveLinkedList

A lock‐free intrusive single‐linked list.

AtomicIntrusiveLinkedListHook

A very simple atomic single‐linked list primitive.

AtomicLinkedList

A very simple atomic single‐linked list primitive.

AtomicNotificationQueue

A producer‐consumer queue for passing tasks to consumer thread.

AtomicReadMostlyMainPtr

An atomically‐swappable owner of a ReadMostlyMainPtr.

AtomicStruct

AtomicStruct<T> work like C++ atomics, but can be used on any POD type <= 8 bytes.

AtomicUnorderedInsertMap

You're probably reading this because you are looking for an AtomicUnorderedMap<K,V> that is fully general, highly concurrent (for reads, writes, and iteration), and makes no performance compromises. We haven't figured that one out yet. What you will find here is a hash table implementation that sacrifices generality so that it can give you all of the other things.

AutoTimer

Automatically times a block of code, printing a specified log message on destruction or whenever the log() method is called. For example:

BadExpectedAccess

An exception type thrown by Expected on catastrophic logic errors, i.e., when the caller tries to access the value within an Expected but when the Expected instead contains an error.

BadFormatArg

Exception thrown when a format argument string is invalid.

BadPolyAccess

Exception type that is thrown on invalid access of an empty Poly object.

BadPolyCast

Exception type that is thrown when attempting to extract from a Poly a value of the wrong type.

BaseFormatterImpl

Formatter class.

BasicDynamicTokenBucket

Thread‐safe (atomic) token bucket implementation.

BasicFixedString

A class for holding up to N characters of type Char that is amenable to constexpr string manipulation. It is guaranteed to not perform any dynamic allocation.

BasicTokenBucket

Specialization of BasicDynamicTokenBucket with a fixed token generation rate and a fixed maximum burst size.

Baton

A Baton allows a thread to block once and be awoken. Captures a single handoff, and during its lifecycle (from construction/reset to destruction/reset) a baton must either be post()ed and wait()ed exactly once each, or not at all.

BenchmarkSuspender

Supporting type for BENCHMARK_SUSPEND defined below.

BitIterator

Fast bit iteration facility.

Bits

Wrapper class with static methods for various bit‐level operations, treating an array of T as an array of bits (in little‐endian order). (T is either an unsigned integral type or Unaligned<X>, where X is an unsigned integral type)

BlockingQueue

Abstract interface for a queue that can block callers until items are available.

BlockingQueueAddResult

Result of adding an item to a BlockingQueue.

BucketedTimeSeries

This class represents a bucketed time series which keeps track of values added in the recent past, and merges these values together into a fixed number of buckets to keep a lid on memory use if the number of values added is very large.

CPUThreadPoolExecutor

A Thread pool for CPU bound tasks.

CacheLocality

Holds cache sharing topology for the current system.

CallbackAsyncSignalHandler

Derived template class that allows forwarding of a callback to be invoked in the overridden signalReceived().

CalledProcessError

Exception thrown by *Checked methods of Subprocess.

CancellationCallback

A CancellationCallback object registers the callback with the specified CancellationToken such that the callback will be executed if the corresponding CancellationSource object has the requestCancellation() method called on it.

CancellationSource

A CancellationSource object provides the ability to request cancellation of operations that an associated CancellationToken was passed to.

CancellationToken

A CancellationToken is an object that can be passed into an function or operation that allows the caller to later request that the operation be cancelled.

CertificateIdentityVerifier

CertificateIdentityVerifier implementations are used during TLS handshakes to extract and verify end‐entity certificate identities.

CertificateIdentityVerifierException

Base of exception hierarchy for CertificateIdentityVerifier failure reasons.

Cleanup

Base class for structured async cleanup.

Codel

CoDel (controlled delay) is an active queue management algorithm from networking for battling bufferbloat.

ConcurrentBSkipDefaultPolicy

The default configuration policy for ConcurrentBSkipList.

ConcurrentBSkipList

Concurrent B‐skip‐list container; declared here for friend declarations.

ConcurrentBitSet

An atomic bitset of fixed size (specified at compile time).

ConcurrentHashMap

Implementations of high‐performance Concurrent Hashmaps that support erase and update.

ConcurrentLazy

Thread‐safe, delayed initialization of a value computed once at first access.

ConcurrentSkipList

A concurrent, sorted, unique‐key associative container.

ConstructorCallbackList

A mixin that fires registered callbacks each time a class constructor runs.

ConversionError

Exception thrown when a conversion fails, carrying a ConversionCode.

ConversionErrorBase

Base class for exceptions thrown by folly conversion routines.

CoreAllocator

An C++ allocator adapter for coreMalloc/Free. The allocator is stateless, to avoid increasing the footprint of the container that uses it, so the stripe needs to be passed out of band: allocate() can only be called while there is an active CoreAllocatorGuard. deallocate() can instead be called at any point.

CoreAllocatorGuard

Scope guard that binds CoreAllocator allocations to a stripe.

CoreCachedSharedPtr

This class creates core‐local caches for a given shared_ptr, to mitigate contention when acquiring/releasing it.

CoreCachedWeakPtr

Core‐local cache of weak pointers to a shared object.

CpuId

Identification of an Intel CPU. Supports CPUID feature flags (EAX=1) and extended features (EAX=7, ECX=0). Values from http://www.intel.com/content/www/us/en/processors/processor‐identification‐cpuid‐instruction‐note.html

CustomLogFormatter

A LogFormatter implementation that produces messages in a format specified using a config.

CxxAllocatorAdaptor

CxxAllocatorAdaptor

CxxHugePageAllocator

STL compatible huge page allocator, for use with STL‐style containers.

CxxIoUringAllocator

An STL‐compatible allocator backed by the io_uring arena.

DCheckRequestContextRestoredGuard

Debug‐only guard that checks the context is unchanged across a scope.

DeadlockDetector

Interface for an object that watches an executor for deadlocks.

DeadlockDetectorFactory

Factory that creates DeadlockDetector instances for executors.

DecoratedAsyncTransportWrapper

Convenience class so that AsyncTransport can be decorated without having to redefine every single method.

DefaultAlign

An alignment policy that carries a runtime alignment value.

DefaultKeepAliveExecutor

An Executor accepts units of work with add(), which should be threadsafe.

DefaultWeightFn

DynamicBoundedQueue supports: ‐ Dynamic memory usage that grows and shrink in proportion to the number of elements in the queue. ‐ Adjustable capacity that helps throttle pathological cases of producer‐consumer imbalance that may lead to excessive memory usage. ‐ The adjustable capacity can also help prevent deadlock by allowing users to temporarily increase capacity substantially to guarantee accommodating producer requests that cannot wait. ‐ SPSC, SPMC, MPSC, MPMC variants. ‐ Blocking and spinning‐only variants. ‐ Inter‐operable non‐waiting, timed until, timed for, and waiting variants of producer and consumer operations. ‐ Optional variable element weights.

DelayedDestruction

DelayedDestruction is a helper class to ensure objects are not deleted while they still have functions executing in a higher stack frame.

DelayedDestructionBase

DelayedDestructionBase is a helper class to ensure objects are not deleted while they still have functions executing in a higher stack frame.

DelayedInit

DelayedInit ‐‐ thread‐safe delayed initialization of a value. There are two important differences between Lazy and DelayedInit: 1. DelayedInit does not store the factory function inline. 2. DelayedInit is thread‐safe.

DerivedNodeTraits

Node traits for types that derive from IntrusiveHeapNode.

DestructorCheck

DestructorCheck is a helper class that helps to detect if a tracked object was deleted. This is useful for objects that request callbacks from other components.

DetachFdState

DigestBuilder

Stat digests, such as TDigest, can be expensive to merge. It is faster to buffer writes and merge them in larger chunks. DigestBuilder buffers writes to improve performance.

DiscriminatedPtr

Discriminated pointer.

DrivableExecutor

An executor that can be driven forward via its drive() method.

DynamicBoundedQueue

A bounded, FIFO, multi‐producer multi‐consumer queue with adjustable capacity and dynamic memory usage.

DynamicConstructor

Each specialization of DynamicConstructor has the function 'static dynamic construct(const C&);'

DynamicConverter

Each specialization of DynamicConverter has the function 'static T convert(const dynamic&);'

DynamicParser

A small DSL for losslessly parsing a folly::dynamic into another representation while recording any parts that cause errors.

DynamicParserLogicError

When DynamicParser is used incorrectly, it will throw this exception instead of reporting an error via releaseErrors(). It is unsafe to call any parser methods after catching a LogicError.

DynamicParserParseError

With DynamicParser::OnError::THROW, reports the first error. It is forbidden to call releaseErrors() if you catch this.

DynamicRingQueue

A ring buffer queue backed by a power‐of‐two sized array that grows on overflow. Not thread‐safe.

EDFThreadPoolExecutor

DEPRECATED: use folly::StripedEDFThreadPoolExecutor directly. This wrapper exists only for legacy callers.

ElfHwCaps

Identification of hardware capabilities via the ELF auxiliary vector.

EnablePrimaryFromThis

EnablePrimaryFromThis provides an object with appropriate access to the functionality of the PrimaryPtr holding this.

Endian

Converts integral and floating point values between native, big‐endian, and little‐endian byte orders.

EpollBackend

EventBase

An event loop that drives asynchronous I/O and timers.

EventBaseAtomicNotificationQueue

Lock‐free notification queue of tasks consumed by a single consumer.

EventBaseBackendBase

Abstract base for the backend that drives an EventBase loop.

EventBaseEvent

Wrapper around a libevent event owned by an EventBase backend.

EventBaseLocal

Storage for data tied to the lifetime of an EventBase.

EventBaseManager

Manager for per‐thread EventBase objects. This class will find or create a EventBase for the current thread, associated with thread‐specific storage for that thread. Although a typical application will generally only have one EventBaseManager, there is no restriction on multiple instances; the EventBases belong to one instance are isolated from those of another.

EventBaseObserver

Observer interface that samples EventBase loop activity.

EventBaseThread

Owns an EventBase running on its own thread.

EventBaseThreadTimekeeper

A Timekeeper that schedules timeouts on an externally supplied EventBase.

EventCount

Event count: a condition variable for lock free algorithms.

EventHandler

The EventHandler class is used to asynchronously wait for events on a file descriptor.

EventUtil

low‐level libevent utility functions

EvictingCacheMap

A general purpose LRU evicting cache designed to support constant time set/get/insert/erase ops. The only required configuration parameter is the maxSize, which is the maximum number of entries held by the cache, which is also dynamically changeable. Insertion will evict (and destroy with ~TKey and ~TValue) existing entries in LRU order as needed to keep number of entries less than maxSize. When automatic eviction is triggered, the minimum number of evictions is clearSize, which is configurable with a default of 1. If a callback is specified with setPruneHook, it is invoked for each eviction. However, the prune hook cannot manage object lifetimes because it is not invoked on erase nor cache destruction.

ExecutionObserver

Observes the execution of a task. Multiple execution observers can be chained together. As a caveat, execution observers should not remove themselves from the list of observers during execution

ExecutionObserverScopeGuard

Notifies a list of execution observers around a scoped task execution.

Executor

Schedules and runs asynchronous work.

ExecutorBlockingContext

Records whether blocking is forbidden while an executor is running work.

ExecutorBlockingGuard

Scoped guard that pushes an executor blocking context for its lifetime.

ExecutorBlockingList

A node in the thread‐local stack of executor blocking contexts.

ExecutorKeepAlive

ExecutorKeepAlive is a safe pointer to an Executor.

ExecutorWithPriority

Wraps an executor so that submitted tasks run at a chosen priority.

Expected

Forward declarations

F14FastMap

F14 hash map that selects a value or vector layout based on entry size.

F14FastSet

F14 hash set that selects a value or vector layout based on element size.

F14HashToken

An opaque token holding the precomputed hash of a key.

F14HashedKey

A key paired with its precomputed F14 hash token for faster lookups.

F14NodeMap

F14 hash map that stores each entry in a separately allocated node.

F14NodeSet

F14 hash set that stores each element in a separately allocated node.

F14TableStats

Diagnostic statistics describing the internal state of an F14 table.

F14ValueMap

F14 hash map that stores entries inline in the main array.

F14ValueSet

F14 hash set that stores elements inline in the main array.

F14ValueSetTester

Test‐only accessor granting inspection of F14ValueSet internals.

F14VectorMap

F14 hash map that keeps entries in a dense, index‐addressable vector.

F14VectorSet

F14 hash set that keeps elements in a dense, index‐addressable vector.

FallbackGetcpu

A class that lazily binds a unique (for each implementation of Atom) identifier to a thread. This is a fallback mechanism for the access spreader if __vdso_getcpu can't be loaded

FiberIOExecutor

An IOExecutor that executes funcs under mapped fiber context

File

A File represents an open file.

FileHandlerFactory

FileHandlerFactory is a LogHandlerFactory that constructs log handlers that write to a file.

FileWriterFactory

A helper class for creating an AsyncFileWriter or ImmediateFileWriter based on log handler options settings.

Fingerprint

Compute the Rabin fingerprint.

FixedAlign

An alignment policy that carries a compile‐time alignment value.

FixedCapacityRingQueue

A simple fixed‐capacity ring buffer queue backed by a power‐of‐two sized array. Not thread‐safe.

FlatCombining

‐ A simple interface that requires minimal extra code by the user. To use this interface efficiently the user‐provided functions must be copyable to folly::Function without dynamic allocation. If this is impossible or inconvenient, the user is encouraged to use the custom interface described below. ‐ A custom interface that supports custom combining and custom request structure, either for the sake of smart combining or for efficiently supporting operations that are not be copyable to folly::Function without dynamic allocation. ‐ Both synchronous and asynchronous operations. ‐ Request records with and without thread‐caching. ‐ Combining with and without a dedicated combiner thread.

FlatCombiningPriorityQueue

Thread‐safe priority queue based on flat combining. If the constructor parameter maxSize is greater than 0 (default = 0), then the queue is bounded. This template provides blocking, non‐blocking, and timed variants of each of push(), pop(), and peek() operations. The empty() and size() functions are inherently non‐blocking.

FormatArg

Parsed format argument.

FormatKeyNotFoundException

Exception class thrown when a format key is not found in the given associative container keyed by strings. We inherit std::out_of_range for compatibility with callers that expect exception to be thrown directly by std::map or std::unordered_map.

FormatValue

Customization point for formatting a value of type T.

Formatter

Binds a format string to its arguments for deferred formatting.

Function

A polymorphic, move‐only wrapper for any callable of a given signature.

FunctionRef

A reference wrapper for callable objects

FunctionScheduler

Schedules any number of functions to run at various intervals. E.g.,

FutureExecutor

Executor wrapper that adds future‐returning task submission.

FutureSplitter

FutureSplitter provides a `getFuture()' method which can be called multiple times, returning a new Future each time. These futures are completed when the original Future passed to the FutureSplitter constructor is completed, and are completed on the same executor (if any) and at the same priority as the original Future. Calls to `getFuture()' after that time return a completed Future.

FutureSplitterInvalid

Exception thrown when a FutureSplitter holds no Future.

GenerationalCacheMap

A concurrent, bounded, approximately‐LRU cache with lock‐free lookups.

GetThreadIdCollector

Interface for executors that provide a WorkerProvider to collect thread ids.

Getcpu

Knows how to derive a function pointer to the VDSO implementation of getcpu(2), if available

GlobalCPUExecutorCounters

Load counters for the global immutable CPU executor.

GlogStyleFormatter

A LogFormatter implementation that produces messages in a format similar to that produced by the Google logging library.

GoogleLogger

The default AutoTimer logger, which writes timing messages via glog.

GroupVarint

Group varint encoder/decoder for 32‐ or 64‐bit integers.

GroupVarintDecoder

Simplify use of GroupVarint* for the case where the last group in the input may be incomplete (but the exact size of the input is known). Allows for extracting values one at a time.

GroupVarintEncoder

Simplify use of GroupVarint* for the case where data is available one entry at a time (instead of one group at a time). Handles buffering and an incomplete last chunk.

HHWheelTimerBase

Hashed Hierarchical Wheel Timer

Hash

Generic variadic hasher that dispatches to folly::hasher for each argument.

HashingThreadId

Assigns thread ids by hashing the platform thread identifier.

HazptrLockFreeLIFO

A lock‐free LIFO stack that reclaims popped nodes with hazard pointers.

HazptrSWMRSet

Set implemented as an ordered singly‐linked list.

HazptrWideCAS

Wide CAS.

HeapTimekeeper

A Timekeeper with a dedicated thread that manages the timeouts using a heap. Timeouts can be scheduled with microsecond resolution, though in practice the accuracy depends on the OS scheduler's ability to wake up the worker thread in a timely fashion.

HeterogeneousAccessEqualTo

Equality comparator that enables heterogeneous lookup for key type T.

HeterogeneousAccessHash

Hasher that enables heterogeneous lookup for key type T.

HeterogeneousPreHashCompatible

Trait that is true when two hashers agree on prehash values.

Histogram

A basic histogram class.

HugePageSize

A supported huge page size and its mount point.

IOBuf

IOBuf manages heap‐allocated byte buffers.

IOBufCompare

Ordering for IOBuf objects. Compares data in the entire chain.

IOBufEqualTo

Equality predicate for IOBuf objects. Compares data in the entire chain.

IOBufGreater

Greater predicate for IOBuf objects. Compares data in the entire chain.

IOBufGreaterEqual

At‐least predicate for IOBuf objects. Compares data in the entire chain.

IOBufHash

Hasher for IOBuf objects. Hashes the entire chain using SpookyHashV2.

IOBufIovecBuilder

IOBufIovecBuilder exists to help allocate and fill IOBuf chains using iovec‐based scatter/gather APIs.

IOBufLess

Less predicate for IOBuf objects. Compares data in the entire chain.

IOBufLessEqual

At‐most predicate for IOBuf objects. Compares data in the entire chain.

IOBufNotEqualTo

Inequality predicate for IOBuf objects. Compares data in the entire chain.

IOBufQueue

An IOBufQueue encapsulates a chain of IOBufs and provides convenience functions to append data to the back of the chain and remove data from the front.

IOExecutor

An executor backed by an I/O event loop.

IOObjectCache

Caches objects of type T that are bound to an EventBase from the global IOExecutor.

IOThreadPoolDeadlockDetectorObserver

Observer that attaches a deadlock detector to each event base of an IO thread pool.

IOThreadPoolExecutor

A Thread Pool for IO bound tasks

IOThreadPoolExecutorBase

Base interface for executors that run tasks on IO threads with EventBases.

IPAddress

A representation of an IP address (IPv4 or IPv6).

IPAddressFormatException

Exception that is thrown when dealing with invalid IP addresses. A subclass of std::runtime_error

IPAddressV4

A representation of an IPv4 address.

IPAddressV6

A representation of an IPv6 address.

Ignore

A type that is implicitly constructible from and assignable by anything.

ImmediateFileWriter

A LogWriter implementation that immediately writes to a file descriptor when it is invoked.

ImmutableRequestData

ImmutableRequestData is a folly::RequestData that holds an immutable value. It is thread‐safe (a requirement of RequestData) because it is immutable.

ImplicitSynchronized [deprecated]

Deprecated subclass of Synchronized that provides implicit locking via operator‐>. This is intended to ease migration while preventing accidental use of operator‐> in new code.

ImplicitlyWeightedEvictingCacheMap

A variant of EvictingCacheMap that assigns weights to entries and evicts entries in LRU order to ensure the total weight of all entries stays below some set maximum. ImplicitlyWeighted means this variant derives the weights from the key‐values using a chosen function. TWeightFn must be a type implementing size_t operator()(const TKey&, const Tvalue&)

Indestructible

Wraps an inline object that is never destructed, for Meyers singletons.

IndexedMemPool

Instances of IndexedMemPool dynamically allocate and then pool their element type (T), returning 4‐byte integer indices that can be passed to the pool's operator[]method to access or obtain pointers to the actual elements. The memory backing items returned from the pool will always be readable, even if items have been returned to the pool. These two features are useful for lock‐free algorithms. The indexing behavior makes it easy to build tagged pointer‐like‐things, since a large number of elements can be managed using fewer bits than a full pointer. The access‐after‐free behavior makes it safe to read from T‐s even after they have been recycled, since it is guaranteed that the memory won't have been returned to the OS and unmapped (the algorithm must still use a mechanism to validate that the read was correct, but it doesn't have to worry about page faults), and if the elements use internal sequence numbers it can be guaranteed that there won't be an ABA match due to the element being overwritten with a different type that has the same bit pattern.

IndexedMemPoolTraits

A Traits type that controls the object lifecycle strategy of an IndexedMemPool.

Init

RAII object constructed at the beginning of main() and destructed implicitly at the end of main().

InitOptions

Options controlling folly initialization.

InitThreadFactory

A thread factory that runs setup and teardown callbacks around each thread.

InlineExecutor

When work is "queued", execute it immediately inline. Usually when you think you want this, you actually want a QueuedImmediateExecutor.

InlineLikeExecutor

Base class for executors that run queued work inline.

IntrusiveHeap

IntrusiveHeap implements a skew heap with intrusive pointers to provide O(log(n)) operations on any node in the heap with no separately allocated node type.

IntrusiveHeapNode

Base class for items to be inserted into IntrusiveHeap<..., Tag> storing pointers for internal use.

IntrusiveHeapTest

Test fixture granted access to node internals.

InvalidAddressFamilyException

Exception that is thrown when an IP Address is not of the family expected (ie, expected a V4 but is a V6). A subclass of IPAddressFormatException.

IoSqeBase

Base class for an io_uring submission queue entry managed by Folly.

IoUringArena

A memory arena registered with the kernel for io_uring operations.

IoUringBackend

The io_uring‐based EventBase backend.

IoUringBufferProvider

IoUringConnectCallback

Receives notifications about the outcome of an io_uring connect operation.

IoUringConnectHandle

Performs an asynchronous connect over an io_uring‐backed socket.

IoUringDynamicProvidedBufferRing

IoUringDynamicProvidedBufferRingTestHelper

IoUringFdRegistrationRecord

Tracks a file descriptor registered with an io_uring ring.

IoUringOp

A pending operation backed by the Linux io_uring interface.

IoUringOptions

IoUringProvidedBufferRing

IoUringProvidedBufferRingTestHelper

IoUringRecvCallback

Receives notifications about the progress of an io_uring receive operation.

IoUringRecvHandle

Manages inbound receives over an io_uring‐backed socket.

IoUringSendCallback

Receives notifications about the progress of an io_uring send operation.

IoUringSendHandle

Manages a single outbound send over an io_uring‐backed socket.

IoUringZeroCopyBufferPool

IoUringZeroCopyBufferPoolImpl

IoUringZeroCopyBufferPoolTestHelper

IsAvalanchingHasher

Trait: true when hasher Hasher avalanches input entropy across every bit of the hash of key Key.

IsConvertible

Trait detecting whether a type can be a split() output field.

IsRelocatable

A trait describing whether a value of type T can be relocated with memcpy.

IsSomeString

Trait that identifies string‐like types such as std::string and fbstring.

IsZeroInitializable

A trait describing whether value‐initialization equals zero‐filling memory.

JemallocHugePageAllocator

An allocator which uses Jemalloc to create a dedicated huge page arena, backed by 2MB huge pages (on linux x86‐64).

JemallocNodumpAllocator

An allocator which uses Jemalloc to create an dedicated arena to allocate memory from. The only special property set on the allocated memory is that the memory is not dump‐able.

LLCAccessSpreader

Similar to AccessSpreader, but it has exactly one stripe for each last‐level cache that is accessible by the current process.

Latch

Example:

LeakySingleton

A singleton whose instance is intentionally never destroyed.

LegacyStatsClock

A helper clock type to helper older code using BucketedTimeSeries with std::chrono::seconds transition to properly using clock types and time_point objects.

LifoSemImpl

Concrete LIFO semaphore parameterized by its baton and atomic types.

LifoSemMPMCQueue

A blocking multi‐producer, multi‐consumer queue backed by a LIFO semaphore.

LockFreeRingBuffer

LockFreeRingBuffer<T> is a fixed‐size, concurrent ring buffer with the following semantics:

LockedPtr

A LockedPtr keeps a Synchronized<T> object locked for the duration of LockedPtr's existence.

LockedPtrBase

Base class that owns the lock held by a LockedPtr.

LogCategory

LogCategory stores all of the logging configuration for a specific log category.

LogCategoryConfig

Configuration for a LogCategory

LogConfig

Configuration describing log categories and handlers.

LogConfigParseError

Exception thrown when a log configuration string cannot be parsed.

LogFormatter

LogFormatter defines the interface for serializing a LogMessage object into a buffer to be given to a LogWriter.

LogHandler

Consumes and processes log messages.

LogHandlerConfig

Configuration for a LogHandler

LogHandlerFactory

Interface for factories that construct log handlers from config options.

LogMessage

LogMessage represents a single message to be logged.

LogName

The LogName class contains utility functions for processing log category names. It primarily handles canonicalization of names.

LogStream

A std::ostream implementation for use by the logging macros.

LogStreamBuffer

A std::streambuf implementation for use by LogStream

LogStreamProcessor

LogStreamProcessor receives a LogStream and logs it.

LogStreamVoidify

LogStreamVoidify() is a helper class used in the FB_LOG() and XLOG() macros.

LogWriter

Writes serialized log messages to an output.

Logger

Logger is the class you will use to specify the log category when logging messages with FB_LOG().

LoggerDB

LoggerDB stores the set of LogCategory objects.

MPMCPipeline

A multi‐producer, multi‐consumer pipeline of processing stages.

MPMCPipelineStage

Describes a pipeline stage carrying element type T with amplification Amp.

MPMCQueue

MPMCQueue<T> is a high‐performance bounded concurrent queue that supports multiple producers, multiple consumers, and optional blocking. The queue has a fixed capacity, for which all memory will be allocated up front. The bulk of the work of enqueuing and dequeuing can be performed in parallel.

MacAddress

A 48‐bit ethernet MAC address.

MallctlMibCallCache

Caches the resolved MIB for a mallctl command that neither reads nor writes a value, for repeated fast invocation.

MallctlMibReadCache

Caches the resolved MIB for a mallctl command that reads a value, for repeated fast invocation.

MallctlMibReadWriteCache

Caches the resolved MIB for a mallctl command that writes a value and reads the previous one, for repeated fast invocation.

MallctlMibWriteCache

Caches the resolved MIB for a mallctl command that writes a value, for repeated fast invocation.

ManualExecutor

A ManualExecutor only does work when you turn the crank, by calling run() or indirectly with makeProgress() or waitFor().

ManualTimekeeper

Manually controlled Timekeeper for unit testing.

MaybeManagedPtr

MaybeManagedPtr stores either a raw pointer or a shared_ptr. It provides normal pointer operations on the underlying raw pointer/shared_ptr.

MemberNodeTraits

Node traits for types that hold an IntrusiveHeapNode member.

MemoryMapping

Maps files in memory (read‐only).

MicroLockBase

A tiny one‐byte spinlock with a configurable spin and yield budget.

MicroLockCore

Base class holding the lock byte and the bit‐packing helpers shared by every MicroLock specialization.

MicroSpinLock

A really, really small spinlock for fine‐grained locking of lots of teeny‐tiny data.

MoveWrapper

C++11 closures don't support move‐in capture. Nor does std::bind. facepalm.

MultiLevelTimeSeries

This class represents a timeseries which keeps several levels of data granularity (similar in principle to the loads reported by the UNIX 'uptime' command). It uses several instances (one per level) of BucketedTimeSeries as the underlying storage.

MultiSlidingWindowQuantileEstimator

Equivalent to (but more efficient than) a SimpleQuantileEstimator plus one SlidingWindowQuantileEstimator for each requested window.

MutableAtom

MutableAtom is a tiny wrapper that gives you the option of atomically updating values inserted into an AtomicUnorderedInsertMap<K, MutableAtom<V>>. This relies on AtomicUnorderedInsertMap's guarantee that it doesn't move values.

MutableData

MutableData is a tiny wrapper that gives you the option of using an external concurrency control mechanism to updating values inserted into an AtomicUnorderedInsertMap.

MuxIOThreadPoolExecutor

NOTE: This is highly experimental. Do not use.

NamedThreadFactory

A ThreadFactory that names each thread it creates.

NativeSemaphore

A thin wrapper over the platform's native counting semaphore.

NestedCommandLineApp

App that uses a nested command line, of the form:

NestedCommandLineParseResult

Result of parsing a nested command line.

NetworkSocket

NetworkSocket is just a very thin wrapper around either a file descriptor or a SOCKET depending on platform, along with a couple of helper methods for explicitly converting to/from file descriptors, even on Windows.

None

Tag type used to construct an empty Optional, akin to std::nullopt_t.

NotificationQueue

Queue used to deliver messages to an EventBase thread.

ObserverContainer

Policy‐based implementation of ObserverContainerBase.

ObserverContainerBase

Base ObserverContainer and definition of Observers.

ObserverContainerBasePolicyDefault

Policy for ObserverContainerBase.

ObserverContainerStore

Policy‐based implementation of ObserverContainerStoreBase.

ObserverContainerStoreBase

Interface for store of pointers to observers.

ObserverContainerStorePolicyDefault

Policy for ObserverContainerStore.

OpenSSLTicketHandler

Handler for OpenSSL session tickets.

OpenSSLTransportCertificate

Generic interface applications may implement to convey self or peer certificate related information.

OperationCancelled

IMPORTANT: folly‐internal, do NOT use this in new user code. Instead:

Optional

Optional is superseded by std::optional. Now that the C++ has a standardized implementation, Optional exists primarily for backward compatibility.

OptionalEmptyException

Exception thrown when unwrapping the value of an empty Optional.

PackedSyncPtr

An 8‐byte pointer with an integrated spin lock and 15‐bit integer.

ParkingLot

A portable, futex‐like waiter registry keyed by address.

PasswordInFile

Password collector that reads a passphrase from a file on construction.

PicoSpinLock

Spin lock on a single bit in an integral type. You can use this with 16, 32, or 64‐bit integral types.

Poly

Poly is a class template that makes it relatively easy to define a type‐erasing polymorphic object wrapper.

PolyExtends

Used in the definition of a Poly interface to say that the current interface is an extension of a set of zero or more interfaces.

PolyMembers

A list of member pointers describing a Poly interface.

PolySelf_

Helper that computes the self type of a Poly interface node.

PredefinedQuantiles

Predefined sets of quantiles for use with QuantileHistogram.

PrimaryPtr

PrimaryPtr should be used to achieve deterministic destruction of objects with shared ownership. Once an object is managed by a PrimaryPtr, shared_ptrs can be obtained pointing to that object. However destroying those shared_ptrs will never call the object destructor inline. To destroy the object, join() method must be called on PrimaryPtr or the task returned from cleanup() must be completed, which will wait for all shared_ptrs to be released and then call the object destructor on the caller supplied execution context.

PrimaryPtrRef

PrimaryPtrRef is a non‐owning reference to the pointer. PrimaryPtr::join() and the PrimaryPtr::cleanup() work do NOT wait for outstanding PrimaryPtrRef objects to be released.

PriorityLifoSemMPMCQueue

A blocking queue with priority levels backed by per‐priority MPMC queues and a LIFO semaphore.

PriorityThreadFactory

A ThreadFactory that sets nice values for each thread. The main use case for this class is if there are multiple CPUThreadPoolExecutors in a single process, or between multiple processes, where some should have a higher priority than the others.

PriorityUnboundedBlockingQueue

A blocking queue with a fixed number of priority levels.

PriorityUnboundedQueueSet

PriorityUnboundedQueueSet

ProcessReturnCode

Class to wrap a process return code.

ProducerConsumerQueue

A single‐producer, single‐consumer, lock‐free bounded queue.

ProgramExit

Exception that commands may throw to force the program to exit cleanly with a given exit code. NestedCommandLineApp::run() catches this and makes run() print the given message on stderr (followed by a newline, unless empty; the message is only allowed when exiting with a non‐zero status), and return the exit code. (Other exceptions will propagate out of run())

QuantileEstimates

Summary statistics and quantile estimates produced by a QuantileEstimator.

QuantileHistogram [deprecated]

A histogram that tracks the locations of a fixed set of quantiles.

QueueFullException

Exception thrown when adding to a full queue that uses THROW behavior.

QueueInfo

Aggregates the worker thread ids per queue name along with their keep‐alives.

QueueObserver

Observes enqueue and dequeue events on a queue.

QueueObserverFactory

Factory that creates QueueObserver instances for a queue.

QueuedImmediateExecutor

Runs inline like InlineExecutor, but with a queue so that any tasks added to this executor by one of its own callbacks will be queued instead of executed inline (nested). This is usually better behavior than Inline.

RWSpinLock

A simple, small (4‐bytes), but unfair rwlock. Use it when you want a nice writer and don't expect a lot of write/read contention, or when you need small rwlocks since you are creating a large number of them.

Random

Provides static random number generation utilities.

Range

A lightweight, non‐owning view over a range of elements.

ReadMostlyMainPtr

Owning pointer that gives cheap, lock‐free reads to shared objects.

ReadMostlyMainPtrDeleter

This can be used to destroy multiple ReadMostlyMainPtrs at once.

ReadMostlySharedPtr

Shared reader handle to a read‐mostly managed object.

ReadMostlyWeakPtr

Non‐owning weak reference to a read‐mostly managed object.

ReadSqe

RecordIOReader

Class to read from a RecordIO file. Will skip invalid records.

RecordIOWriter

Class to write a stream of RecordIO records to a file.

RegexMatchCache

RegexMatchCache

RegexMatchCacheDynamicBitset

RegexMatchCacheDynamicBitset

RegexMatchCacheIndexedVector

RegexMatchCacheIndexedVector

RegexMatchCacheKey

RegexMatchCacheKey

RegexMatchCacheKeyAndView

RegexMatchCacheKeyAndView

RelaxedConcurrentPriorityQueue

A fast, scalable, relaxed concurrent priority queue.

Replaceable

Wraps a T that can be replaced in place without allocation or indirection.

RequestContext

Per‐request context associated with an enqueued item.

RequestContextSaverScopeGuard

RequestContextSaverScopeGuard allows to replace the current context without switching back to original context, while ensuring that the original context is restored on guard destruction.

RequestContextScopeGuard

Note: you probably want to use ShallowCopyRequestContextScopeGuard This resets all other RequestData for the duration of the scope!

RequestData

Base class for data that follows an async request through a process.

RequestEventBase

Sets and retrieves the EventBase associated with a request via RequestContext.

RequestToken

A token used to fetch data from a RequestContext.

SSLAcceptRunner

Run SSL_accept via a runner

SSLContext

Wrap OpenSSL SSL_CTX into a class.

SSLException

Exception describing an SSL error and its underlying OpenSSL code.

STTimerFDTimeoutManager

A TimeoutManager backed by a TimerFD that tracks a single timeout.

SaturatingSemaphore

SaturatingSemaphore is a flag that allows concurrent posting by multiple posters and concurrent non‐destructive waiting by multiple waiters.

ScheduledExecutor

An executor that supports timed scheduling. Like RxScheduler.

ScopedEventBaseThread

Helper that runs an EventBase loop on a dedicated std::thread.

ScopedUnlocker

This class temporarily unlocks a LockedPtr in a scoped manner.

SequencedExecutor

An executor that sequences tasks whose submissions were sequenced.

SequentialThreadId

Assigns thread ids from a monotonically increasing counter.

SerializedExecutor

A sequenced executor that never runs its tasks concurrently.

ShallowCopyRequestContextScopeGuard

This guard maintains all the RequestData pointers of the parent. This allows to overwrite a specific RequestData pointer for the scope's duration, without breaking others.

SharedMutexImpl

A small, fast, scalable reader‐writer lock.

SharedMutexPolicyDefault

Default tuning and feature policy for SharedMutexImpl.

SharedMutexToken

Records where a shared lock was recorded so it can be released quickly.

SharedPromise

SharedPromise provides the same interface as Promise, but you can extract multiple Futures from it, i.e. you can call getFuture() as many times as you'd like. When the SharedPromise is fulfilled, all of the Futures are completed. Calls to getFuture() after the SharedPromise is fulfilled return a completed Future. If you find yourself constructing collections of Promises and fulfilling them simultaneously with the same value, consider this utility instead. Likewise, if you find yourself in need of setting multiple callbacks on the same Future (which is indefinitely unsupported), consider refactoring to use SharedPromise to "split" the Future.

ShutdownSemError

The exception thrown when wait()ing on an isShutdown() LifoSem

ShutdownSocketSet

Set of sockets that allows immediate, take‐no‐prisoners abort.

SimpleAsyncIO

SimpleAsyncIO is a wrapper around AsyncIO intended to hide all the details.

SimpleQuantileEstimator

A QuantileEstimator that buffers writes for 1 second.

SingleWriterFixedHashMap

SingleWriterFixedHashMap:

Singleton

Singleton allows for simple access to registering and instantiating singletons. Create instances of this class in the global scope of type Singleton<T> to register your singleton for later access via Singleton<T>::try_get().

SingletonRelaxedCountable

A CRTP base class that keeps a global count of instances of a type.

SingletonRelaxedCountableAccess

Provides access to the running instance count of a countable type.

SingletonRelaxedCounter

A singleton‐per‐tag relaxed counter.

SingletonThreadLocal

SingletonThreadLocal

SingletonVault

SingletonVault ‐ a library to manage the creation and destruction of interdependent singletons.

SlidingWindowQuantileEstimator

A QuantileEstimator that keeps values for nWindows * windowDuration (see constructor). Values are buffered for windowDuration.

SocketAddress

Provides a unified interface for socket addresses.

SocketFds

Represents an ordered collection of file descriptors. This union type either contains: ‐ FDs to be sent on a socket ‐‐ with shared ownership, since the sender may still need them, OR ‐ FDs just received, with sole ownership.

SocketOptionKey

Uniquely identifies a handle to a socket option value. Each combination of level and option name corresponds to one socket option value.

SocketOptionValue

Variant container for socket option values: integer or string. Implicit ctor/compares with int for backward compatibility.

SoftRealTimeExecutor

Executor that performs priority‐based scheduling with a deadline assigned to each task.

SparseByteSet

* SparseByteSet

SpinLock

A small, non‐recursive spin lock with a standard lock interface.

SpinLockArray

Array of spinlocks where each one is padded to prevent false sharing. Useful for shard‐based locking implementations in environments where contention is unlikely.

SplitOptions

SplitOptions

StandardLogHandler

StandardLogHandler is a LogHandler implementation that uses a LogFormatter class to serialize the LogMessage into a string, and then gives it to a LogWriter object.

StandardLogHandlerFactory

StandardLogHandlerFactory contains helper methods for LogHandlerFactory implementations that create StandardLogHandler objects.

StaticConst

A template for defining ODR‐usable constexpr instances, free of ODR and init‐order problems.

StrandContext

Shared serialising queue used by StrandExecutors to run at most one task at a time.

StrandExecutor

Executor that serialises work while delegating execution to a parent executor, sharing a StrandContext to serialise across executors.

StreamHandlerFactory

StreamHandlerFactory is a LogHandlerFactory that constructs log handlers that write to stdout or stderr.

StreamingStats

Robust and efficient online computation of statistics, using Welford's method for variance. https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm

StrictConjunction

A logical conjunction of traits that evaluates all sub‐conditions eagerly.

StrictDisjunction

A logical disjunction of traits that evaluates all sub‐conditions eagerly.

StripedEDFThreadPoolExecutor

An approximate implementation of an Earliest Deadline First executor.

StripedPriorityUnboundedBlockingQueue

A BlockingQueue sharded by LLC cache. Compared to the default PriorityUnboundedBlockingQueue, this can reduce contention on systems with a large number of LLC caches, at the cost of unfairness and work conservation; see the StripedThrottledLifoSem documentation for a detailed explanation.

StripedThrottledLifoSem

A striped version of ThrottledLifoSem.

StripedThrottledLifoSemBalancer

Background balancer that periodically corrects stripe imbalances.

Subprocess

Subprocess.

SubprocessError

Base exception thrown by the Subprocess methods.

SubprocessSpawnError

Exception thrown if the subprocess cannot be started.

SubstringConversionCode

Error type for trySplitTo(), below.

Synchronized

folly::Synchronized pairs a datum with a mutex. The datum can only be reached through a LockedPtr, typically acquired via .rlock() or .wlock(); the mutex is held for the lifetime of the LockedPtr.

SynchronizedBase

SynchronizedBase is a helper parent class for Synchronized<T>.

SynchronizedPtr

A Synchronized variant that protects a pointed‐to object.

SynchronizedPtrLockedElement

Holds a lock together with access to the element it protects.

SysAllocator

SysAllocator

SysArena

Arena that uses the system allocator (malloc / free)

SysBufferDeleter

Deleter that releases memory with std::free.

TDigest

TDigests are a biased quantile estimator designed to estimate the values of the quantiles of streaming data with high accuracy and low memory, particularly for quantiles at the tails (p0.1, p1, p99, p99.9). See https://github.com/tdunning/t‐digest/blob/master/docs/t‐digest‐paper/histo.pdf for an explanation of what the purpose of TDigests is, and how they work.

TLRefCount

A reference counter that keeps per‐thread counts to avoid contention.

TcpInfo

Abstraction layer for capturing current TCP and congestion control state.

TcpInfoDispatcher

Dispatcher that enables calls to TcpInfo to be intercepted for tests.

TcpInfoDispatcherContainer

Container for folly::TcpInfoDispatcher.

ThreadCachedArena

Thread‐caching arena: allocate memory which gets freed when the arena gets destroyed.

ThreadCachedInt

A thread‐safe counter that caches increments in thread‐local storage.

ThreadFactory

Interface for creating threads used by executors.

ThreadIdWorkerProvider

WorkerProvider backed by an explicitly maintained set of thread ids.

ThreadLocal

Thread‐local storage for a value of type T.

ThreadLocalPRNG

A PRNG with one instance per thread. This PRNG uses a mersenne twister random number generator and is seeded from /dev/urandom. It should not be used for anything which requires security, only for statistical randomness.

ThreadLocalPtr

Thread‐local owning pointer to a value of type T.

ThreadPoolExecutor

Base class for implementing threadpool based executors.

ThreadPoolListHook

A hook for tracking which threads belong to which thread pools. This is used only by a gdb extension to aid in debugging. You won't be able to see any useful information from within C++ code.

ThreadWheelTimekeeper

The default Timekeeper implementation which uses a HHWheelTimer on an EventBase in a dedicated thread. Users needn't deal with this directly, it is used by default by Future methods that work with timeouts.

ThreadedExecutor

* ThreadedExecutor

ThreadedRepeatingFunctionRunner

For each function fn you add to this object, fn will be run in a loop in its own thread, with the thread sleeping between invocations of fn for the duration returned by fn's previous run.

ThrottledLifoSem

ThrottledLifoSem is a semaphore that can wait up to a configurable wakeUpInterval before waking up a sleeping waiter. This gives an opportunity to new waiters to consume the posted values, avoiding the overhead of waking up a thread when the already active threads can consume values fast enough, effectively allowing to batch the work. The semaphore is "throttled" because sleeping waiters can be awoken at most once every wakeUpInterval.

TimedDrivableExecutor

A DrivableExecutor can be driven via its drive() method or its driveUntil() that drives until some time point.

TimekeeperScheduledExecutor

This class turns a Executor into a ScheduledExecutor.

TimekeeperScheduledExecutorNoTimekeeper

Exception thrown when no timekeeper is available for scheduling.

TimeoutManager

Base interface to be implemented by all classes expecting to manage timeouts. AsyncTimeout will use implementations of this interface to schedule/cancel timeouts.

TimeoutQueue

A queue of scheduled timeout events keyed by expiration time.

TimerFD

TimerFDTimeoutManager

Manages many timeouts on a single TimerFD.

TimeseriesHistogram

TimeseriesHistogram tracks data distributions as they change over time.

TokenBucketPolicyDefault

Default policy for the token bucket templates, selecting the alignment, atomic type, clock, and concurrency behavior.

TokenBucketStorage

Thread‐safe (atomic) token bucket primitive.

TransparentStringEqualTo

Equality comparator for strings of CharT supporting transparent lookup.

TransparentStringHash

Hasher for strings of CharT supporting transparent lookup.

Try

A wrapper that contains either an instance of T, an exception, or nothing.

TryException

Exception type thrown by Try when it is used incorrectly.

TupleHasher

Recursively hashes tuple elements, combining them into a single hash.

TypeError

Exception thrown when a dynamic is accessed as the wrong type.

TypedIOBuf

Wrapper class to handle a IOBuf as a typed buffer (to a standard layout class).

UTF8StringPiece

A view over a UTF‐8 string that iterates it as UTF‐32 code points.

Unaligned

Representation of an unaligned value of a POD type.

UnalignedNoASan

An Unaligned<T> variant whose loads and stores can have address sanitizer disabled on demand.

UnboundedBlockingQueue

A blocking queue with unbounded capacity.

UnboundedQueue

UnboundedQueue supports a variety of options for unbounded dynamically expanding an shrinking queues, including variations of: ‐ Single vs. multiple producers ‐ Single vs. multiple consumers ‐ Blocking vs. spin‐waiting ‐ Non‐waiting, timed, and waiting consumer operations. Producer operations never wait or fail (unless out‐of‐memory).

Unexpected

Unexpected ‐ a helper type used to disambiguate the construction of Expected objects in the error state.

Unit

In functional programming, the degenerate case is often called "unit". In C++, "void" is often the best analogue. However, because of the syntactic special‐casing required for void, it is frequently a liability for template metaprogramming. So, instead of writing specializations to handle cases like SomeContainer<void>, a library author may instead rule that out and simply have library users use SomeContainer<Unit>. Contained values may be ignored. Much easier.

Uri

Class representing a URI.

UserMetric

A single user‐defined benchmark metric holding a value and its kind.

UsingUninitializedTry

Exception thrown when an uninitialized Try is accessed.

VirtualEventBase

Light‐weight view onto an existing EventBase.

VirtualExecutor

VirtualExecutor implements a light‐weight view onto existing Executor.

WTCallback

Callback object for HHWheelTimer that fulfills a future on timeout.

WaitOptions

WaitOptions

WeightedEvictingCacheMap

A variant of EvictingCacheMap that tracks weights for entries and evicts entries in LRU order to ensure the total weight of all entries stays below some set maximum. Weights are stored as a size_t with each entry.

WorkerProvider

WorkerProvider is a simple interface that can be used to collect information about worker threads that are pulling work from a given queue.

WriteCallbackWithState

Wrapper class for WriteCallback that includes a boolean variable to track whether the write has already started or not

WriteChainAsyncTransportWrapper

Helper class that redirects write() and writev() calls to writeChain().

WriteFileAtomicOptions

Options controlling the behavior of writeFileAtomic().

WriteSqe

XlogCategoryInfo

Per‐XLOG()‐statement storage for the resolved log category.

XlogFileScopeInfo

File‐scope cache of the log level and category shared by a .cpp file.

XlogLevelInfo

A file‐static XlogLevelInfo and XlogCategoryInfo object is declared for each XLOG() statement.

adopt_lock_state_t

Tag type indicating that a lock transition should adopt existing lock state.

aligned

A wrapper that stores a value of type T with at least the given alignment.

allocator_delete

allocator_delete

annotate_ignore_thread_sanitizer_guard

Scoped guard that suppresses ThreadSanitizer reports within its lifetime.

any_badge

For cases when multiple badge holders need to call a function we can use folly::any_badge over each individual holder allowed. We allow subsets of badges to lift into supersets: folly::any_badge[ lifts into folly::any_badge[.]]

asymmetric_thread_fence_traits

Traits providing the asymmetric fence callables for an atomic template.

atomic_grow_array

atomic_grow_array

atomic_grow_array_policy_default

atomic_grow_array_policy_default

atomic_ref

A reference wrapper offering atomic operations on a non‐atomic object.

atomic_shared_ptr

Atomic wrapper around std::shared_ptr providing lock‐free style operations.

atomic_thread_fence_traits

Trait giving the thread‐fence function for an atomic template.

atomic_value_type

Trait giving the effective value type of an atomic‐like type.

badge

Badge pattern allows us to abstract over friend classes and make friend feature more scoped. Using this simple technique we can specify a badge tag on specific functions we want to gate for particular caller contexts (badge holders). Badge can only be constructed by the specified badge holder binding the tagged functions to that call site.

base64_decode_error

Exception thrown when base64 decoding fails.

base64_decode_result

Result of a low‐level base64 decode operation.

basic_cstring_view

cstring_view

basic_fbstring

This is the basic_string replacement. For conformity, basic_fbstring takes the same template parameters, plus the last one which is the core.

basic_once_flag

The flag template to be used with call_once. Parameterizable by the mutex type and atomic template. The mutex type is required to mimic std::mutex and the atomic type is required to mimic std::atomic.

c_array

A container for C arrays, for returning non‐zero‐sized C arrays from constexpr functions.

cacheline_align_t

An empty type aligned to cacheline_align_v.

cli_apply_args_files_error

Exception thrown by the simple cli_apply_args_files overload.

cli_apply_args_files_options

Options controlling args‐file expansion.

cli_apply_args_files_receiver

Callback interface receiving events while expanding args‐files.

coded_rich_error

Start with the user docs in docs/rich_error_code.md.

compact_once_flag

An alternative flag that can be used with call_once that uses only 1 byte. Uses a 3‐state std::atomic<uint8_t> with wait/notify for synchronization.

compare_equal_to

Comparison predicate that is true when the underlying comparator C reports the two operands as equal.

compare_greater

Comparison predicate that is true when the underlying comparator C reports the left operand as greater than the right operand.

compare_greater_equal

Comparison predicate that is true when the underlying comparator C reports the left operand as greater than or equal to the right operand.

compare_less

Comparison predicate that is true when the underlying comparator C reports the left operand as less than the right operand.

compare_less_equal

Comparison predicate that is true when the underlying comparator C reports the left operand as less than or equal to the right operand.

compare_not_equal_to

Comparison predicate that is true when the underlying comparator C reports the two operands as not equal.

const_dynamic_view

///////////////////////////////////////////////////////////////////

constexpr_iterated_squares_desc

constexpr_iterated_squares_desc

custom_stop_watch

Calculates the duration of time intervals. Prefer this over directly using monotonic clocks. It is very lightweight and provides convenient facilities to avoid common pitfalls.

default_null_handler

Default policy handling null‐pointer violations for not_null.

drop_unit

Maps a type to itself, and maps Unit back to void.

dummy_fbstring_core

Dummy fbstring core that uses an actual std::string. This doesn't make any sense ‐ it's just for testing purposes.

dynamic

Forward declaration of folly::dynamic used for serializing results.

dynamic_view

A mutable view of a dynamic that can extract values without copying.

emplace_args

Argument tuple for variadic emplace/constructor calls. Stores arguments by (decayed) value. Restores original argument types with reference qualifiers and adornments at unpack time to emulate perfect forwarding.

empty_try_as_error_t

Empty‐`Try` policy type that maps the empty state to an error result.

empty_try_with

Empty‐`Try` policy that produces a result by invoking a callable.

epoll_event

error_or_stopped

Holds an error (std::exception_ptr) or a "stopped"/cancellation state.

exception_shared_string

An immutable refcounted string suitable for use in an exception.

exception_wrapper

Throwing exceptions can be a convenient way to handle errors. Storing exceptions in an exception_ptr makes it easy to handle exceptions in a different thread or at a later time. exception_ptr can also be used in a very generic result/exception wrapper.

factory_constructor_t

Tag type selecting the factory constructor of Indestructible.

fbstring_core

This is the core of the string. The code should work on 32‐ and 64‐bit and both big‐ and little‐endian architectures with any Char size.

fbvector

Forward declaration of the fbvector container.

floating_point_integral_constant

floating_point_integral_constant

fmt_vformat_mangle_format_string_fn

fmt_vformat_mangle_format_string_fn fmt_vformat_mangle_format_string

format_string_for_each_named_arg_fn

Callable that invokes a function for each named argument in a format string.

function_like_value

Transports the cvref‐qualifications of Src onto the function type Dst.

function_remove_cvref

Yields the function type F stripped of its cvref‐qualifications.

function_traits

Discovers every fact of a function type S as types or constexpr values.

get_exception_tag_t

get_exception_tag_t

get_rich_error_code_fn

Retrieves the rich error code associated with an error.

guaranteed_not_null_provider

Base that grants trusted subclasses a token to bypass null checks.

hash_counter_engine

hash_counter_engine

hasher

Primary template for folly's per‐type hasher; specialized for supported key types.

hazptr_array

hazptr_array

hazptr_deleter

hazptr_deleter

hazptr_domain

hazptr_domain

hazptr_holder

hazptr_holder

hazptr_local

Grants hazptr_local access to the thread cache internals.

hazptr_obj

hazptr_obj

hazptr_obj_base

hazptr_obj_base

hazptr_obj_base_linked

hazptr_obj_base_linked

hazptr_obj_cohort

hazptr_obj_cohort

hazptr_obj_linked

hazptr_obj_linked

hazptr_obj_list

hazptr_obj_list

hazptr_obj_retired_list

hazptr_obj_retired_list

hazptr_rec

hazptr_rec

hazptr_root

hazptr_root

hazptr_tc

hazptr_tc:

hazptr_tc_entry

hazptr_tc_entry

hazptr_tc_tls_tag

Tag type identifying the hazard pointer thread cache's thread‐local singleton.

heap_vector_map

A heap_vector_map based on heap layout.

heap_vector_set

heap_vector_set is a specialization of heap_vector_container

hybrid_lock

A lock‐holder type which holds shared locks for shared mutex types or exclusive locks otherwise.

hybrid_lock_base

A lock‐holder base which holds shared locks for shared mutex types or exclusive locks otherwise.

hybrid_lock_guard

For shared mutex types, effectively shared_lock_guard; otherwise, effectively unique_lock_guard.

immortal_rich_error_t

A rich error whose storage has static (immortal) lifetime.

index_iterator

index_iterator

indirect

indirect

inheriting_coded_rich_error

inheriting_coded_rich_error

initlist_construct_t

Initializer lists are a powerful compile time syntax introduced in C++11 but due to their often conflicting syntax they are not used by APIs for construction.

invoke_first_match

Composite invoker delegating to the first invoker matching the call.

invoke_member_wrapper_fn

Wraps a callable made via FOLLY_INVOKE_MEMBER so it is recognizable.

invoke_traits

Traits container mimicking the C++17 invocation traits for invoker I.

io_uring

io_uring_buf

io_uring_buf_ring

io_uring_cqe

io_uring_zcrx_cqe

isTry

Trait that detects whether a type is a Try.

is_allocator

A trait type to test whether a type is an allocator.

is_arithmetic

A trait type that is true when T is an arithmetic type.

is_bounded_array

A type to check if a given type is a bounded array.

is_complete

is_complete is_complete_v

is_constexpr_default_constructible

A type which determines whether the type parameter is constexpr default‐constructible.

is_detected

A trait type to test whether a metafunction succeeds in substitution.

is_heap_vector_map

Trait that reports whether T is an instantiation of heap_vector_map.

is_heap_vector_set

Trait that reports whether T is an instantiation of heap_vector_set.

is_instantiation_of

A type to check if a given type is an instantiation of a class template.

is_integral

A trait type that is true when T is an integral type.

is_invocable

Trait testing whether F is invocable with A...; mimics std::is_invocable.

is_invocable_r

Trait testing whether the result of invoking F is convertible to R; mimics std::is_invocable_r.

is_non_bool_integral

A trait type that is true when Int is integral but not bool.

is_nothrow_invocable

Trait testing whether F is nothrow‐invocable with A...; mimics std::is_nothrow_invocable.

is_nothrow_invocable_r

Trait testing the nothrow invocation of F with result convertible to R; mimics std::is_nothrow_invocable_r.

is_nothrow_tag_invocable

Trait testing whether the tag_invoke CPO is nothrow‐invocable.

is_result

Type trait to test if a type is a result.

is_signed

A trait type that is true when T is a signed type.

is_small_sorted_vector_map

Trait that detects a small_sorted_vector_map specialization.

is_small_sorted_vector_set

Trait that detects a small_sorted_vector_set specialization.

is_small_vector

Trait that detects whether a type is a folly::small_vector.

is_sorted_vector_map

Trait that detects a sorted_vector_map specialization.

is_sorted_vector_set

Trait that detects a sorted_vector_set specialization.

is_tag_invocable

Trait testing whether the tag_invoke CPO can be invoked with Tag and Args.

is_transparent

A trait type to test whether a type follows the is‐transparent protocol.

is_unbounded_array

A type to check if a given type is an unbounded array.

is_unsigned

A trait type that is true when T is an unsigned type.

json_patch

A parsed JSON Patch document, as described in RFC 6902 "JSON Patch".

json_pointer

A parsed JSON Pointer, as described in RFC 6901 "JSON Pointer".

kahan_accumulator

Kahan (Kahan‐Babushka‐Neumaier) compensated summation accumulator.

lift_unit

Maps a type to itself, and maps void to Unit.

like

A trait to replace the cvref category of Dst with that of Src.

literal_c_str

literal_c_str

literal_string

literal_string

make_signed

A trait that yields the signed integer type corresponding to T.

make_unsigned

A trait that yields the unsigned integer type corresponding to T.

manual_safe_callable_t

A callable wrapper that manually asserts the safe_alias level S.

manual_safe_ref_t

A reference wrapper that manually asserts the safe_alias level S.

manual_safe_val_t

A value wrapper that manually asserts the safe_alias level S.

max_align_t

A type aligned at least as strictly as the most‐aligned fundamental type.

member_pointer_traits

member_pointer_traits

nestable_coded_rich_error

nestable_coded_rich_error

nonesuch

nonesuch

not_null

not_null specializable class.

not_null_base

not_null_base, the common interface for all not_null subclasses. ‐ Implicitly constructs and casts just like a PtrT. ‐ Has unwrap() function to access the underlying PtrT.

or_unwind

Awaitable that unwinds a result on the error path, holding a reference.

or_unwind_owning

Awaitable that unwinds an owned result on the error path.

order_preserving_reinsertion_view_fn

Extension point yielding an order‐preserving reinsertion view of a container.

order_preserving_reinsertion_view_or_default_fn

Extension point returning a reinsertion view or the argument itself.

partial_ordering

mimic: std::partial_ordering, c++20 (partial)

propagate_const

A const‐propagating wrapper around a pointer‐like type.

rcu_domain

Defines an RCU domain that scopes readers and updaters together.

rcu_obj_base

Base class giving derived objects preallocated RCU retirement storage.

reentrant_allocator

A reentrant mmap‐based allocator.

reentrant_allocator_options

Configuration options for reentrant_allocator.

relaxed_atomic

Like std::atomic, but without the std::memory_order parameters on any member function.

remove_cvref

A type trait to remove all const volatile and reference qualifiers on a type T

reproducible_accumulator

Reproducible floating‐point accumulator via binned floating‐point arithmetic.

reproducible_accumulator

Reproducible floating‐point accumulator via binned floating‐point arithmetic.

result

A value, an error (std::exception_ptr), or a "stopped"/cancellation state.

rich_error

A rich error carrying a user‐defined base type and a formatted message.

rich_error_base

Base class for exceptions that carry a queryable rich error code.

rich_error_bases_and_own_codes

Aggregates a rich error's base types with the codes it owns.

rich_error_code

Maps an error‐code enum onto the rich‐error machinery.

rich_error_code_query

Query object used to retrieve the rich error code from an exception.

rich_exception_ptr

rich_exception_ptr is an analog of exception_wrapper or std::exception_ptr, with some extra efficiency optimizations, and integration with rich_error / epitaph. It was designed to support rich‐error features in result.h.

rich_msg

A message that can automatically capture source locations.

rich_ptr_to_underlying_error

Quacks like Ex*, but shows an epitaph stack when formatted.

rvalue_reference_wrapper

Class template that wraps a reference to an rvalue. Similar to std::reference_wrapper but with three important differences:

safe_alias_of

Primary trait template that measures the safe_alias level of a type.

safe_alias_of_pack

Computes the safe_alias level of a composite type.

shared_from_this_ptr

shared_from_this_ptr

shared_lock_base

A lock‐holder base which holds shared locks, usable with any shared mutex.

shared_lock_guard

A lock‐guard which holds shared locks, usable with any shared mutex type.

small_heap_vector_map

Specialize heap_vector_map to integral key type and std::less comparaison. small_heap_map achieve a very fast find for small map < 200 elements.

small_vector

Forward declaration of the small_vector container.

sorted_equivalent_t

Tag type indicating a container is sorted but not necessarily unique.

sorted_unique_t

Tag type indicating a container is sorted and unique.

sorted_vector_map

A sorted_vector_map is similar to a sorted_vector_set but stores <key,value> pairs instead of single elements.

sorted_vector_set

A sorted_vector_set is a container similar to std::set<>, but implemented as a sorted array with std::vector<>.

splitmix64_engine

splitmix64_engine

static_function_deleter

static_function_deleter

stopped_result_t

Tag type signaling that a work‐tree was stopped (aka cancelled).

strong

strong<T, Tag> ‐ prevent accidental mixing of semantically different uses of the same underlying type. Known as "newtype" in some languages. C++20. Default‐construction value‐initializes T, even if it's a primitive type.

strong_derefable

strong_derefable<T, Tag> ‐ a strong type with pointer‐like dereference operators. Inherits all functionality from strong and adds operator* and operator‐> for convenient access to the underlying value. Usage:

tag_invoke_result

Holds the result type of a valid tag_invoke call, or is empty otherwise.

tag_t

tag_t tag

tape

A container adapter that builds a version of vector<vector> on top of a random access underlying container.

thread_cached_synchronized

A synchronized value with a per‐thread cache for accelerated reads.

to_ascii_alphabet

Alphabet mapping a digit value to its ASCII character, lower‐ or upper‐case.

to_floating_point_convertible

Holds an integral value for conversion to a floating‐point target type.

to_integral_convertible

Holds a floating‐point value for conversion to an integral target type.

to_narrow_convertible

Holds an integral value for possibly‐narrowing conversion to a target type.

transparent

Adapter that marks a type as transparent for heterogeneous lookup.

uint_division_result

uint_division_result

uint_divisor

uint_divisor

unicode_code_point_utf8

A UTF‐8 encoding of a single Unicode code point.

unicode_error

Exception thrown when Unicode decoding or encoding fails.

unique_hash_key

unique_hash_key

unique_hash_key_with

unique_hash_key_with

unique_lock_base

A lock‐holder base which holds exclusive locks, usable with any mutex type.

unique_lock_guard_base

A lock‐guard which holds exclusive locks, usable with any mutex type.

unsafe_default_initialized_cv

Convertible to any default‐constructible type, yielding a default‐initialized value on conversion.

unsafe_for_async_usage

Convenience base or member that tags a type as unsafe for async usage.

unsafe_for_async_usage_if

Conditionally tags a type as unsafe for async usage.

upgrade_lock

A lock‐holder type which holds upgrade locks, usable with any upgrade mutex.

upgrade_lock_base

A lock‐holder base which holds upgrade locks, usable with any upgrade mutex.

value_only_result

A result‐like type that always holds a value (never error or stopped).

variadic_constant_of_fn

variadic_constant_of variadic_constant_of_fn

vtag_t

vtag_t vtag

x86_cpuid_cache_info

Decoded x86 cpuid cache descriptor for one cache level.

x86_cpuid_vendor_name

Vendor identification string as returned by the cpuid instruction.

xoshiro256pp

xoshiro256++ pseudo‐random number generator.

Type Aliases

Name

Description

ArenaAllocator

Standard‐conforming allocator that draws memory from an Arena.

AsyncIOQueue

A queue of operations backed by an AsyncIO context.

AsyncSocketObserverContainerBaseT

Base observer‐container type for AsyncSocket observers.

AsyncTransportWrapper

Alias kept for backward compatibility with older transport wrapper names.

AtomicUnorderedInsertMap64

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.

BaseFormatter

Alias for BaseFormatterImpl with an index sequence built from Args.

ByteArray16

Specialization for std::array for IPv6 addresses

ByteArray4

Specialization of std::array for IPv4 addresses

ByteRange

A read‐only view over a sequence of bytes.

CIDRNetwork

Pair of IPAddress, netmask

CIDRNetworkV4

Pair of IPAddressV4, netmask

CIDRNetworkV6

Pair of IPAddressV6, netmask

Cob

Callback type for functions scheduled on an executor.

ConcurrentBSkipInlineMap

A concurrent sorted map with payloads stored inline in the leaves.

ConcurrentBSkipMap

A concurrent sorted map with separately stored payloads.

ConcurrentBSkipSet

A concurrent sorted set built on ConcurrentBSkipList.

ConcurrentHashMapSIMD

SIMD‐backed ConcurrentHashMap based on F14ValueMap.

CountedIntrusiveList

An intrusive list with const‐time size() method.

DMPMCQueue

DMPMCQueue

DMPSCQueue

DMPSCQueue

DSPMCQueue

DSPMCQueue

DSPSCQueue

DSPSCQueue

DefaultRefCount

Default reference‐count type used by the read‐mostly smart pointers.

DefaultVectorType

Alias for the default vector type used by xoshiro256pp.

DelayedDestructionUniquePtr

Unique pointer that destroys a DelayedDestruction object via destroy().

DistributedMutex

The default distributed mutex, ready to use without template arguments.

Duration

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:

DynamicTokenBucket

Dynamic token bucket with an adjustable rate and burst size using the default policy.

ExpectedErrorType

Alias for an Expected type's associated error_type

ExpectedValueType

Alias for an Expected type's associated value_type

FallbackArenaAllocator

Arena allocator that falls back to std::allocator when the arena is exhausted.

FallbackGetcpuType

The FallbackGetcpu specialization selected for the current platform.

FallbackSysArenaAllocator

SysArena allocator that falls back to std::allocator when exhausted.

FixedString

A fixed‐capacity string of char with capacity for N characters.

Func

A move‐only callable holding a unit of work with no arguments or result.

GetDeadlockDetectorFactoryInstance

Function type that returns the deadlock detector factory instance.

GroupVarint32

GroupVarint codec for 32‐bit values.

GroupVarint32Decoder

GroupVarint decoder for 32‐bit values.

GroupVarint64

GroupVarint codec for 64‐bit values.

GroupVarint64Decoder

GroupVarint decoder for 64‐bit values.

HHWheelTimer

A hashed hierarchical wheel timer with millisecond resolution.

HHWheelTimerHighRes

A hashed hierarchical wheel timer with microsecond resolution.

HighResDuration

A higher‐resolution duration alias used where microsecond precision is needed.

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.

IOBufFactory

Callable that creates an IOBuf with the requested capacity.

Identity

Type of the identity function object.

Ignored

An alias for Ignore that accepts and ignores any type arguments.

IndexedMemPoolTraitsEagerRecycle

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.

IndexedMemPoolTraitsLazyRecycle

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.

IntrusiveList

An intrusive list.

IntrusiveListHook

An auto‐unlink intrusive list hook.

IsOneOf

A trait to test whether T is one of the types T1, T2, ..., Tn.

LaggingQueueInfoFunc

Callable that returns information about lagging queues.

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.

MSLGuard

///////////////////////////////////////////////////////////////////

MakeQueueObserverFactory

Function type that builds a QueueObserverFactory.

MallctlMibExchangeCache

Caches the resolved MIB for a mallctl command that exchanges a value of a single type.

MeteredExecutor

Executor that meters how many tasks it feeds into a wrapped executor.

MicroLock

Default MicroLock specialization with the standard spin and yield budget.

MutableByteRange

A mutable view over a sequence of bytes.

MutableStringPiece

A mutable view over a sequence of char.

PolyDecay

When used in conjunction with PolySelf, controls how to construct Poly types related to the one currently being instantiated.

PolySelf

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.

PriorityUMPMCQueueSet

Priority queue set with multi‐producer, multi‐consumer queues.

PriorityUMPSCQueueSet

Priority queue set with multi‐producer, single‐consumer queues.

PriorityUSPMCQueueSet

Priority queue set with single‐producer, multi‐consumer queues.

PriorityUSPSCQueueSet

Priority queue set with single‐producer, single‐consumer queues.

QuadraticProbingAtomicHashMap

An AtomicHashMap alias that uses quadratic probing.

RegexMatchCacheKeyBase

The base hash‐key type underlying RegexMatchCacheKey.

RequestDataItem

A token/data pair used to populate a RequestContext.

ResolveNapiIdCallback

SPSerialExecutor

Single‐producer version of SmallExecutor. It is the responsibility of the caller to guarantee that calls to add() are externally serialized, but it can be slightly faster.

SSLContextPtr

Shared‐ownership pointer to an SSLContext.

SafeIntrusiveList

A safe intrusive list.

SafeIntrusiveListHook

A safe‐link intrusive list hook.

SerialExecutor

Executor that runs added tasks serially and in order on a parent executor.

SharedMutex

Default SharedMutex; an alias for the write‐priority variant.

SharedMutexReadPriority

SharedMutex variant that gives priority to readers.

SharedMutexSuppressTSAN

SharedMutex variant that suppresses ThreadSanitizer rwlock annotations.

SharedMutexTracked

SharedMutex variant that tracks the id of the owning thread.

SharedMutexWritePriority

SharedMutex variant that gives priority to writers.

SocketCmsgMap

Maps socket option keys to integer control‐message values.

SocketNontrivialCmsgMap

Maps socket option keys to string control‐message values.

SocketOptionMap

Maps socket option keys to their values.

SrcPortForQueueIdCallback

StringPiece

A read‐only view over a sequence of char.

SysArenaAllocator

Standard‐conforming allocator backed by a SysArena.

SysBufferUniquePtr

A unique_ptr owning a std::malloc‐allocated buffer freed with std::free.

ThreadCachedArenaAllocator

Standard‐conforming allocator backed by a ThreadCachedArena.

TokenBucket

Token bucket with a fixed rate and burst size using the default policy.

UMPMCQueue

Unbounded multi‐producer, multi‐consumer queue.

UMPSCQueue

Unbounded multi‐producer, single‐consumer queue.

USPMCQueue

Unbounded single‐producer, multi‐consumer queue.

USPSCQueue

Unbounded single‐producer, single‐consumer queue.

UserCounters

Maps user‐defined counter names to their metric values.

_t

* _t

aligned_hazptr_holder

Type used by hazptr_array and hazptr_local.

aligned_storage_for_t

An uninitialized storage type suitable for holding an object of type T.

aligned_storage_t

An uninitialized storage type of the given length and alignment.

apply_result

Mimic the invoke suite of traits for tuple based apply invocation

apply_result_t

The result type of applying F to the elements of Tuple.

atomic_value_type_t

The effective value type of an atomic‐like type.

back_emplace_iterator

Behaves just like std::back_insert_iterator except that it calls emplace_back() instead of insert(). Uses perfect forwarding.

cacheline_aligned

An aligned wrapper for T using at least cache‐line alignment.

coarse_stop_watch

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.

conditional_t

conditional_t

copy_cvref_t

copy_cvref_t

cpo_t

Type of a customization‐point object, deduced from its tag value.

cstring_view

A null‐terminated string view over char.

detected_or

detected_or

detected_or_t

detected_or_t

detected_t

detected_t

drop_unit_t

Alias for the type produced by drop_unit.

emplace_iterator

Behaves just like std::insert_iterator except that it calls emplace() instead of insert(). Uses perfect forwarding.

enable_hasher_helper

A helper for defining partial specializations of a hasher class that rely on other partial specializations of that hasher class being usable.

enable_std_hash_helper

A helper for defining partial specializations of a hasher class that rely on other partial specializations of that hasher class being usable.

erased_unique_ptr

erased_unique_ptr

errc_rich_error

The rich‐error counterpart to std::system_error, coding a std::errc.

fbstring

A basic_fbstring specialized for char, the common string type.

fmt_vformat_mangle_format_string_options

Options type for fmt_vformat_mangle_format_string.

format_string_for_each_named_arg_options

Options type for format_string_for_each_named_arg.

front_emplace_iterator

Behaves just like std::front_insert_iterator except that it calls emplace_front() instead of insert(). Uses perfect forwarding.

function_arguments_element_t

The type of the argument at index Idx of the given function type.

function_arguments_size_t

The argument‐list size of the given function type, as an integral_constant.

function_like_value_t

The function type formed by transporting the cvref of Src onto Dst.

function_remove_cvref_t

The function type F with its cvref‐qualifications removed.

function_result_t

The result type of the given function type.

hazard_pointer

hazard_pointer class name consistent with standard proposal

hazard_pointer_domain

hazard_pointer_domain class name consistent with standard proposal

hazard_pointer_obj_base

hazard_pointer_obj_base class template name consistent with standard proposal

hint_emplace_iterator

Behaves just like std::insert_iterator except that it calls emplace_hint() instead of insert(). Uses perfect forwarding.

index_constant

An alias for a std::integral_constant of type std::size_t.

index_sequence_for_tuple

Helper to generate an index sequence from a tuple like type

int128_t

A signed 128‐bit integer type, where the compiler supports one.

int_bits_lg_t

An alias for the signed integer type with 2ˆlg_bits bits.

int_bits_t

An alias for the signed integer type with the given number of bits.

invoke_result

Holds the result type of invoking F with A...; mimics std::invoke_result.

is_applicable

Trait testing whether F is invocable with the elements of Tuple.

is_applicable_r

Trait testing whether applying F to Tuple yields a result convertible to R.

is_cleanup

Trait constant that is true when T models the async cleanup concept.

is_enable_master_from_this

Trait that reports whether T publicly derives from EnablePrimaryFromThis.

is_hashable

Checks that the given hasher template's specialization for the given type is usable with the standard library containters, for example std::unordered_set<T, Hasher<T>>.

is_hasher_usable

Checks the requirements that the Hasher class must satisfy in order to be used with the standard library containers, for example std::unordered_set<T, Hasher>.

is_nothrow_applicable

Trait testing whether F is nothrow‐invocable with the elements of Tuple.

is_nothrow_applicable_r

Trait testing the nothrow application of F to Tuple with result convertible to R.

is_nothrow_tag_invocable_r

Trait testing whether a nothrow tag_invoke yields a result convertible to R.

is_replaceable

Trait that is true if T is an instantiation of Replaceable.

is_tag_invocable_r

Trait testing whether a tag_invoke call yields a result convertible to R.

iterator_category_t

Extracts iterator_category from an iterator.

iterator_key_type_t

Extracts a key type from an iterator, leverages the knowledge that key/value containers usually use std::pair<const K, V> as a value_type.

iterator_mapped_type_t

Extracts a mapped type from an iterator.

iterator_reference_t

Extracts reference from an iterator (C++20 iter_reference_t backported)

iterator_value_type_t

Extracts a value type from an iterator.

libevent_fd_t

Portable type of a libevent event file descriptor.

lift_unit_t

Alias for the type produced by lift_unit.

like_t

like like_t

make_signed_t

An alias for the signed integer type corresponding to T.

make_unsigned_t

An alias for the unsigned integer type corresponding to T.

member_pointer_member_t

member_pointer_member_t

member_pointer_object_t

member_pointer_object_t

monotonic_clock

Monotonic clock used as the default time source for stop watches.

non_value_result

Backwards‐compatible alias for error_or_stopped.

once_flag

The flag type to be used with call_once.

register_pass_t

register_pass_t

relaxed_atomic_bool

A relaxed_atomic over bool.

relaxed_atomic_char

A relaxed_atomic over char.

relaxed_atomic_char16_t

A relaxed_atomic over char16_t.

relaxed_atomic_char32_t

A relaxed_atomic over char32_t.

relaxed_atomic_int

A relaxed_atomic over int.

relaxed_atomic_int16_t

A relaxed_atomic over std::int16_t.

relaxed_atomic_int32_t

A relaxed_atomic over std::int32_t.

relaxed_atomic_int64_t

A relaxed_atomic over std::int64_t.

relaxed_atomic_int8_t

A relaxed_atomic over std::int8_t.

relaxed_atomic_int_fast16_t

A relaxed_atomic over std::int_fast16_t.

relaxed_atomic_int_fast32_t

A relaxed_atomic over std::int_fast32_t.

relaxed_atomic_int_fast64_t

A relaxed_atomic over std::int_fast64_t.

relaxed_atomic_int_fast8_t

A relaxed_atomic over std::int_fast8_t.

relaxed_atomic_int_least16_t

A relaxed_atomic over std::int_least16_t.

relaxed_atomic_int_least32_t

A relaxed_atomic over std::int_least32_t.

relaxed_atomic_int_least64_t

A relaxed_atomic over std::int_least64_t.

relaxed_atomic_int_least8_t

A relaxed_atomic over std::int_least8_t.

relaxed_atomic_intmax_t

A relaxed_atomic over std::intmax_t.

relaxed_atomic_intptr_t

A relaxed_atomic over std::intptr_t.

relaxed_atomic_llong

A relaxed_atomic over long long.

relaxed_atomic_long

A relaxed_atomic over long.

relaxed_atomic_ptrdiff_t

A relaxed_atomic over std::ptrdiff_t.

relaxed_atomic_schar

A relaxed_atomic over signed char.

relaxed_atomic_short

A relaxed_atomic over short.

relaxed_atomic_size_t

A relaxed_atomic over std::size_t.

relaxed_atomic_uchar

A relaxed_atomic over unsigned char.

relaxed_atomic_uint

A relaxed_atomic over unsigned int.

relaxed_atomic_uint16_t

A relaxed_atomic over std::uint16_t.

relaxed_atomic_uint32_t

A relaxed_atomic over std::uint32_t.

relaxed_atomic_uint64_t

A relaxed_atomic over std::uint64_t.

relaxed_atomic_uint8_t

A relaxed_atomic over std::uint8_t.

relaxed_atomic_uint_fast16_t

A relaxed_atomic over std::uint_fast16_t.

relaxed_atomic_uint_fast32_t

A relaxed_atomic over std::uint_fast32_t.

relaxed_atomic_uint_fast64_t

A relaxed_atomic over std::uint_fast64_t.

relaxed_atomic_uint_fast8_t

A relaxed_atomic over std::uint_fast8_t.

relaxed_atomic_uint_least16_t

A relaxed_atomic over std::uint_least16_t.

relaxed_atomic_uint_least32_t

A relaxed_atomic over std::uint_least32_t.

relaxed_atomic_uint_least64_t

A relaxed_atomic over std::uint_least64_t.

relaxed_atomic_uint_least8_t

A relaxed_atomic over std::uint_least8_t.

relaxed_atomic_uintmax_t

A relaxed_atomic over std::uintmax_t.

relaxed_atomic_uintptr_t

A relaxed_atomic over std::uintptr_t.

relaxed_atomic_ullong

A relaxed_atomic over unsigned long long.

relaxed_atomic_ulong

A relaxed_atomic over unsigned long.

relaxed_atomic_ushort

A relaxed_atomic over unsigned short.

relaxed_atomic_wchar_t

A relaxed_atomic over wchar_t.

remove_cvref_t

An alias for the type T with all cv and reference qualifiers removed.

rich_error_hints

Alias for rich error types to declare fast exception‐lookup hints.

safe_alias_constant

An std::integral_constant holding the given safe_alias level.

small_sorted_vector_map

A sorted_vector_map backed by a small_vector with inline capacity N.

small_sorted_vector_set

A sorted_vector_set backed by a small_vector with inline capacity N.

source_location

Portable alias for the standard source_location type.

stop_watch

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.

string_tape

string_tape ‐ a common usecase.

to_ascii_alphabet_lower

Digit alphabet producing lowercase letters.

to_ascii_alphabet_upper

Digit alphabet producing uppercase letters.

type_list_concat_t

type_list_concat_t

type_list_element_t

type_list_element_t

type_list_find_t

type_list_find_t

type_list_size_t

type_list_size_t

type_pack_element_t

In the type pack Ts..., the Ith element.

type_pack_find_t

type_pack_find_t

type_pack_size_t

type_pack_size_t

type_t

A type alias for the first template type argument.

uint128_t

An unsigned 128‐bit integer type, where the compiler supports one.

uint_bits_lg_t

An alias for the unsigned integer type with 2ˆlg_bits bits.

uint_bits_t

An alias for the unsigned integer type with the given number of bits.

unexpected_t

Function‐reference type used as the unexpected disambiguation tag.

unique_hash_key_strong_sha256

unique_hash_key_strong_sha256

unique_lock_guard

Alias to std::lock_guard.

value_list_concat_t

value_list_concat_t

value_list_element_type_t

value_list_element_type_t

value_list_size_t

value_list_size_t

value_pack_element_type_t

value_pack_element_type_t

value_pack_size_t

value_pack_size_t

vector_bool

Convenience alias to use instead of std::vector<bool> to avoid infamous std::vector<bool> specialization.

void_t

A type alias for void that depends on the given template arguments.

xoshiro256pp_32

xoshiro256++ generator producing 32‐bit results.

xoshiro256pp_64

xoshiro256++ generator producing 64‐bit results.

Enums

Name

Description

AcquireMallocatedString

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.

AtomicNotificationQueueTaskStatus

Consumer::operator() can optionally return AtomicNotificationQueueTaskStatus to indicate if the provided task should be considered consumed or discarded. Discarded tasks are not counted towards maxReadAtOnce_.

BSkipInsertOutcome

Detailed result of an insertion into a ConcurrentBSkipList.

CIDRNetworkError

Wraps errors from parsing IP/MASK string

ConversionCode

Error codes describing why a string‐to‐value conversion failed.

DecodeVarintError

Error reported when a varint cannot be decoded.

GoogleLoggerStyle

Output style for the default glog‐based AutoTimer logger.

IPAddressFormatError

Error codes for non‐throwing interface of IPAddress family of functions.

KeyReadPolicy

Selects how Skipper reads a key slot under concurrent writes.

LeafStoragePolicy

Selects how leaf key/payload data is laid out in memory.

LogLevel

Log level values.

MacAddressFormatError

Error codes reported when parsing or constructing a MacAddress fails.

ParkResult

The outcome of a park operation.

PrettyType

Unit families understood by prettyPrint and prettyToDouble.

ProcessPhase

Process phases

QueueBehaviorIfFull

Behavior of a queue when an item is added while the queue is full.

SSLError

Categories of SSL failure reported by SSLException.

SyncType

Whether an atomic write syncs to storage to guarantee ordering.

TLPDestructionMode

Selects which threads' thread‐local instances are destroyed.

UnparkControl

Controls whether a wait node is retained and whether unparking continues.

UriEscapeMode

overloadbrief URI‐escape a string.

UriFormatError

Error codes for parsing issues. Used by tryFromString()

UuidParseCode

Result code returned by UUID parsing functions.

WriteFlags

Flags given by the application for write* calls.

annotate_rwlock_level

The lock mode reported to ThreadSanitizer rwlock annotations.

cli_apply_args_files_errc

Error codes reported by args‐file expansion.

ordering

Three‐way comparison result: less‐than, equal, or greater‐than.

safe_alias

A hierarchy of memory‐safety levels for a type, from least to most safe.

x86_cpuid_vendor

Recognized x86 CPU vendors.

Functions

Name

Description

PrintTo

Printer for GTest.

__folly_memcpy

Folly's tuned memcpy entry point (C linkage inside the folly namespace).

__folly_memset

Set the first count bytes of the block pointed to by dest to ch.

accurate_sum

accurate_sum overloads

acquireLocked

Acquire locks for multiple Synchronized<T> objects, in a deadlock‐safe manner.

acquireLockedPair

A version of acquireLocked() that returns a std::pair rather than a std::tuple, which is easier to use in many places.

activateAsyncStackFrame

Activate the specified AsyncStackFrame on the specified AsyncStackRoot, setting it as the current 'topFrame'.

activateSuspendedLeaf

Push a dummy "leaf" frame into the stack to annotate the stack as "suspended".

addBenchmark

Adds a benchmark. Usually not called directly but instead through the macro BENCHMARK defined below. The lambda function involved can have one of the following forms: * take zero parameters, and the benchmark calls it repeatedly * take exactly one parameter of type unsigned, and the benchmark uses it with counter semantics (iteration occurs inside the function). * 2 versions of the above cases but also accept UserCounters& as as their first parameter.

align_ceil

align_ceil overloads

align_floor

align_floor overloads

alignedForwardMemcpy

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).

aligned_free

Free memory previously obtained from aligned_malloc.

aligned_malloc

Allocate size bytes aligned to align, returning null on failure.

allocateOverAligned

Allocate storage for n values through alloc, honoring over‐alignment.

allocate_not_null_shared

Creates a not_null_shared_ptr using an allocator, like std::allocate_shared.

allocate_sys_buffer

Allocate a size‐byte buffer with std::malloc, throwing on failure.

allocate_unique

allocate_unique, like std::allocate_shared but for std::unique_ptr

allocationBytesForOverAligned

Return the number of bytes allocateOverAligned requests for n values.

appendCodePointToUtf8

Encode a single Unicode code point into a UTF‐8 byte sequence.

applySocketOptions

Applies the given socket options to a socket at the given position.

apply_visitor

apply_visitor overloads

asm_volatile_memory

Emits a compiler barrier preventing reordering of memory accesses.

asm_volatile_pause

Emits a CPU pause/yield hint suitable for spin‐wait loops.

assume

assume(cond) informs the compiler that cond can be assumed true. If cond is not true at runtime the behavior is undefined.

assume_unreachable [noreturn]

assume_unreachable() informs the compiler that the statement is not reachable at runtime. It is undefined behavior if the statement is actually reached.

asymmetric_thread_fence_heavy

Issue a heavyweight asymmetric thread fence.

asymmetric_thread_fence_light

Issue a lightweight asymmetric thread fence.

async

Run a callable asynchronously on the global CPU executor.

atomic_compare_exchange_strong_explicit

Compare‐exchange (strong) that works around a TSAN bug in the standard library version.

atomic_compare_exchange_weak_explicit

Compare‐exchange (weak) that works around a TSAN bug in the standard library version.

attach

attach overloads

available_concurrency

available_concurrency

back_emplacer

Convenience function to construct a folly::back_emplace_iterator, analogous to std::back_inserter().

backslashify

backslashify overloads

base64Decode

base64Decode overloads

base64DecodeRuntime

base64DecodeRuntime overloads

base64DecodedSize

base64DecodedSize overloads

base64Encode

base64Encode overloads

base64EncodeRuntime

Encode a byte range to standard base64 at runtime.

base64EncodedSize

Compute the encoded size for standard base64.

base64PHPStrictDecode

base64PHPStrictDecode overloads

base64PHPStrictDecodeRequiredOutputSize

base64PHPStrictDecodeRequiredOutputSize overloads

base64URLDecode

base64URLDecode overloads

base64URLDecodeRuntime

base64URLDecodeRuntime overloads

base64URLDecodedSize

base64URLDecodedSize overloads

base64URLEncode

base64URLEncode overloads

base64URLEncodeRuntime

Encode a byte range to URL‐safe base64 at runtime.

base64URLEncodedSize

Compute the encoded size for URL‐safe base64.

benchmarkResultsFromDynamic

Deserialize benchmark results from a dynamic value.

benchmarkResultsToDynamic

Serialize benchmark results into a dynamic value.

bitReverse

Reverse the order of the bits in n.

bm_llc_evict

Evict cache lines by writing to a large block of memory.

bm_llc_size

Calculates the size of the LLC (Last Level Cache, typically L3 on x86‐64).

cEscape

cEscape overloads

cUnescape

cUnescape overloads

call_once

call_once overloads

canNallocx

Return whether nallocx() is supported by the current allocator.

canSdallocx

Return whether sdallocx() is supported by the current allocator.

canSetCurrentThreadName

This returns true if the current platform supports setting the name of the current thread.

canSetOtherThreadName

This returns true if the current platform supports setting the name of threads other than the one currently executing.

cancellation_token_merge

Merge the given tokens into a single CancellationToken.

catch_exception

catch_exception overloads

checkAsyncStackFrameIsActive

Perform some consistency checks on the specified AsyncStackFrame, assuming that it is the currently active AsyncStackFrame.

checkFopenError

Checks the return value from a fopen‐style function (non‐null FILE* on success, null on error) and throws on error.

checkFopenErrorExplicit

Checks the return value from a fopen‐style function and throws using an explicit saved errno.

checkKernelError

Checks a Linux kernel‐style return code (>= 0 on success, negative error number on error) and throws on error.

checkPosixError

Checks a POSIX return code (0 on success, error number on error) and throws on error.

checkUnixError

Checks a traditional Unix return code (‐1 and sets errno on error) and throws on error.

checkUnixErrorExplicit

Checks a traditional Unix return code (‐1 on error) and throws using an explicit saved errno.

checkedAlignedMalloc

Allocate size bytes aligned to align, throwing std::bad_alloc on failure.

checkedArrayMalloc

Allocate uninitialized storage for n instances of T, suitably aligned for T.

checkedCalloc

Trivial wrapper around calloc that check for allocation failure and throw std::bad_alloc in that case.

checkedMalloc

Trivial wrapper around malloc that check for allocation failure and throw std::bad_alloc in that case.

checkedRealloc

Trivial wrapper around realloc that check for allocation failure and throw std::bad_alloc in that case.

checked_add

checked_add overloads

checked_div

Divide two integers, reporting division by zero.

checked_mod

Compute the remainder of integer division, reporting division by zero.

checked_mul

Multiply two unsigned integers, reporting overflow instead of wrapping.

checked_muladd

Compute base * mul + add for unsigned integers, reporting overflow.

clear_n_least_significant_bits

Clear the n least significant bits of x, leaving the others unchanged.

clear_n_most_significant_bits

Clear the n most significant bits of x, leaving the others unchanged.

cli_apply_args_files

cli_apply_args_files overloads

cli_args_strings_to_c_strings

Converts a list of strings into a null‐pointer‐terminated array of C strings borrowing the storage of the input strings.

closeNoInt

closeNoInt overloads

codePointToUtf8

Encodes a single Unicode code point as a UTF‐8 string.

compactResize

Resize a vector and shrink its capacity to fit.

compareDynamicWithNestedJson

Like compareJson, but with dynamic instances.

compareDynamicWithTolerance

Like compareJsonWithTolerance, but operates directly on the dynamics.

compareJson

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).

compareJsonWithNestedJson

Like compareJson, but if strNestingDepth > 0 then contained strings that are valid JSON will be compared using compareJsonWithNestedJson(str1, str2, strNestingDepth ‐ 1).

compareJsonWithTolerance

Like compareJson, but allows for the given tolerance when comparing numbers.

compiler_may_unsafely_assume

Permits the compiler to assume the truth of the provided expression.

compiler_may_unsafely_assume_separate_storage

Permits the compiler to assume the two pointers address separate storage.

compiler_may_unsafely_assume_unreachable [noreturn]

Permits the compiler to assume that this statement cannot be reached.

compiler_must_not_elide

Marks t as used so its computation is not elided.

compiler_must_not_predict

Marks t as unpredictable so the compiler cannot optimize on its value.

concurrent_lazy

Creates a ConcurrentLazy with a type deduced from the callable.

constCastFunction

constCastFunction overloads

const_pointer_cast

const_pointer_cast overloads

const_span_cast

Casts in to a span of U over the same memory using const_cast.

constexprLoadUnaligned

Read an unaligned value of type T and return it. Constexpr, but not optimized. Accepts inputs either of char‐array types or char‐backed enum‐array types.

constexprPartialLoadUnaligned

Read an unaligned value of type T and return it. Constexpr, but not optimized. Accepts inputs either of char‐array types or char‐backed enum‐array types.

constexpr_abs

Compute the absolute value of a number.

constexpr_add_overflow_clamped

Add two values, clamping to the type's range on overflow.

constexpr_ceil

constexpr_ceil

constexpr_clamp

constexpr_clamp overloads

constexpr_clamp_cast

constexpr_clamp_cast overloads

constexpr_exp

constexpr_exp overloads

constexpr_find_first_set

constexpr_find_first_set

constexpr_find_last_set

constexpr_find_last_set

constexpr_floor

constexpr_floor

constexpr_isnan

Test whether a value is NaN.

constexpr_log

constexpr_log

constexpr_log2

Compute the integer base‐2 logarithm of a value.

constexpr_log2_ceil

Compute the ceiling of the integer base‐2 logarithm of a value.

constexpr_max

Return the maximum of the given values.

constexpr_min

Return the minimum of the given values.

constexpr_mult

constexpr_mult

constexpr_pow

constexpr_pow overloads

constexpr_round

constexpr_round

constexpr_strcmp

Compares two null‐terminated strings at compile time.

constexpr_strlen

Computes the length of a null‐terminated string at compile time.

constexpr_sub_overflow_clamped

Subtract two values, clamping to the type's range on overflow.

constexpr_trunc

constexpr_trunc overloads

contains

This function checks whether container contains given key. Use container specific .contains() implementation if available, otherwise uses .find() implementation.

convertTo

Return a well‐typed representation of a dynamic.

copy

copy

copy_through_shared_ptr

copy_through_shared_ptr

copy_through_unique_ptr

copy_through_unique_ptr

copy_to_erased_unique_ptr

copy_to_erased_unique_ptr

copy_to_shared_ptr

copy_to_shared_ptr

copy_to_unique_ptr

copy_to_unique_ptr

coreFree

Frees memory allocated with coreMalloc().

coreMalloc

An allocator that can be used with AccessSpreader to allocate core‐local memory.

crange

crange overloads

crc32

Compute the CRC‐32 checksum of a buffer, using a hardware‐accelerated implementation if available or a portable software implementation as a default.

crc32_combine

Given two checksums, combine them in to one checksum.

crc32_type

Compute the CRC‐32 checksum of a buffer, using a hardware‐accelerated implementation if available or a portable software implementation as a default.

crc32c

Compute the CRC‐32C checksum of a buffer, using a hardware‐accelerated implementation if available or a portable software implementation as a default.

crc32c_combine

Combine two CRC‐32C checksums into one, like crc32_combine() but using the CRC‐32C polynomial.

crc32c_combine_seed

crc32c_combine_seed is the same as crc32c_combine. Unlike crc32c_combine that only works for crc32c computed using a starting checksum 0U, this method works for any starting checksum that is an uint32_t.

current_exception

current_exception

current_exception_wrapper

A convenience shorthand for exception_wrapper(current_exception()).

deactivateAsyncStackFrame

Deactivate the specified AsyncStackFrame, clearing the current 'topFrame'.

deactivateSuspendedLeaf

Pop the dummy "leaf" frame off the stack to annotate the stack as having resumed.

deallocateOverAligned

Free storage for n values obtained from allocateOverAligned.

decodeVarint

Decode a value from a given buffer, advances data past the returned value. Throws on error.

decodeZigZag

Reverse the ZigZag encoding produced by encodeZigZag.

default_hazptr_domain

Access the process‐wide default hazard pointer domain.

defaulted

Wraps c so missing‐key lookups return v instead of throwing.

demangle

demangle overloads

demangle_build_has_cxxabi

Report whether demangling was built with cxxabi support.

demangle_build_has_liberty

Report whether demangling was built with libiberty support.

didInsert

Returns whether an outcome represents a fresh insert or a revive.

divCeil

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.

divFloor

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.

divRoundAway

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.

divTrunc

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.

doNotOptimizeAway

Ensure that a value is computed even after optimization.

down_cast

down_cast overloads

down_heap

down_heap overloads

dup2NoInt

Duplicates a file descriptor onto another, retrying on EINTR.

dupNoInt

Duplicates a file descriptor, retrying on EINTR.

dynamic_pointer_cast

dynamic_pointer_cast overloads

emplacer

Convenience function to construct a folly::emplace_iterator, analogous to std::inserter().

empty_erased_unique_ptr

empty_erased_unique_ptr

enable_hazptr_thread_pool_executor

Route hazard pointer reclamation through the global CPU thread pool executor.

encodeVarint

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)

encodeVarintSize

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.

encodeZigZag

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.

ensureCleanupAfterTask

Composes a task with an async cleanup that always runs after it.

enumerate

Adapts a range so a range‐based for loop can also observe the iteration index.

epitaph

epitaph overloads

erase

erase overloads

erase_if

erase_if overloads

errnoStr

Pretty print an errno.

errorCategoryForErrnoDomain

Returns the most appropriate error category for errno‐domain codes on the current platform.

estimateSpaceNeeded

estimateSpaceNeeded overloads

exceptionStr

exceptionStr overloads

exception_ptr_access

Whether exception‐ptr object inspection is supported on this platform.

exception_ptr_get_object

exception_ptr_get_object overloads

exception_ptr_get_object_hint

exception_ptr_get_object_hint overloads

exception_ptr_get_type

Returns the true runtime type info of the exception as stored.

exception_ptr_try_get_object_exact_fast

exception_ptr_try_get_object_exact_fast

exception_ptr_unique

Returns whether the stored exception is uniquely referenced.

exception_ptr_use_count

Returns the reference count of the stored exception.

exchange

Replaces the state of a PrimaryPtr with a new value and returns the old one.

exchangeCurrentAsyncStackRoot

Exchange the current thread's active AsyncStackRoot with the specified AsyncStackRoot pointer, returning the old AsyncStackRoot pointer.

extractFirstSet

extractFirstSet

fdatasyncNoInt

Synchronizes a file's data to storage, retrying on EINTR.

fetch

Utility method to help access elements of a sequence with one uniform interface.

findFirstSet

findFirstSet overloads

findFixed

Linear search for a value in a range whose size is known at compile time.

findLastSet

findLastSet

fingerprint128

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.

fingerprint64

Return the 64‐bit Rabin fingerprint of a string.

fingerprint96

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.

flockNoInt

Applies an advisory lock, retrying on EINTR.

fmap_shared_ptr_aliasing

fmap_shared_ptr_aliasing overloads

fmt_make_format_args_from_map

Builds a dynamic format‐args store from the key/value pairs in map.

fmt_vformat_mangle_name

fmt_vformat_mangle_name overloads

for_each

folly::for_each is a generalized iteration algorithm. Example:

format

format overloads

forward_like

Forwards a value with the value category of another type.

forward_tuple

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

front_emplacer

Convenience function to construct a folly::front_emplace_iterator, analogous to std::front_inserter().

fsyncNoInt

Synchronizes a file's state to storage, retrying on EINTR.

ftruncateNoInt

Truncates a file by descriptor, retrying on EINTR.

getAsyncStackTraceFromInitialFrame

Given an initial AsyncStackFrame, this will write addresses with the return addresses of the frames in this async stack trace, up to maxAddresses written. This assumes addresses has maxAddresses allocated space available.

getBaseLoggingConfig

folly::getBaseLoggingConfig() allows individual executables to easily customize their default logging configuration.

getCPUExecutor [deprecated]

methodset Deprecated

getCurrentAsyncStackRoot

Get access to the current thread's top‐most AsyncStackRoot.

getCurrentThreadID

Get a process‐specific identifier for the current thread.

getCurrentThreadName

Equivalent to getThreadName(std::this_thread::get_id());

getDetachedRootAsyncStackFrame

Get a pointer to a special frame that can be used as the root‐frame for a chain of AsyncStackFrame that does not chain onto a normal call‐stack.

getEventBase [deprecated]

methodset Deprecated

getExecutorBlockingContext

Returns the current thread's executor blocking context, if any is active.

getGlobalCPUExecutor

methodset Executors

getGlobalCPUExecutorCounters

methodset Executors

getGlobalCPUExecutorWeakRef

methodset Executors

getGlobalIOExecutor

methodset Executors

getHugePageSize

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.

getHugePageSizeForDevice

Return the huge page size for a device. returns nullptr if device does not refer to a huge page filesystem.

getHugePageSizes

Get list of supported huge page sizes and their mount points, if hugetlbfs file systems are mounted for those sizes.

getIOExecutor [deprecated]

methodset Deprecated

getJEMallocMallctlArenasAll

Return value of MALLCTL_ARENAS_ALL defined in jemalloc's header.

getKeepAliveToken

getKeepAliveToken overloads

getOSThreadID

Get the operating‐system level thread ID for the current thread.

getRefOrDefault

getRefOrDefault overloads

getTCMallocNumericProperty

Gets the named property.

getTerminateCancellationToken

Returns a CancellationToken that can be used to schedule callbacks. The CancellationToken is cancelled when any of SIGTERM and SIGINT signal is received.

getThreadName

Get the name of the given thread, or nothing if an error occurs or the functionality is not available.

getUnsafeMutableGlobalCPUExecutor

methodset Executors

getUnsafeMutableGlobalEventBase

methodset Executors

getUnsafeMutableGlobalIOExecutor

methodset Executors

getWeakRef

Returns a weak keep‐alive to executor that does not extend its lifetime.

getXlogCategoryNameForFile

Get the default XLOG() category name for the given filename.

get_bit_at

Read the bit at position idx from an array of unsigned integers.

get_cached_pid

Calls getpid() and returns the returned value, with a thread‐safe cache in front. The cache is updated in the child after fork().

get_deadlock_detector_factory_instance

Weak hook resolving to the deadlock detector factory instance getter.

get_default

get_default overloads

get_deleter

Getters

get_emplace_arg

get_emplace_arg overloads

get_exception

get_exception overloads

get_mutable_exception

get_mutable_exception overloads

get_optional

get_optional overloads

get_or_throw

get_or_throw overloads

get_pointer

get_pointer overloads

get_process_phase

Get the current process phase.

get_ptr

get_ptr overloads

get_ptr2

Same as get_ptr but for find variants that search for two keys at once.

get_ref_default

get_ref_default overloads

get_rich_error

get_rich_error overloads

get_underlying

get_underlying overloads

getline

getline overloads

globalJemallocNodumpAllocator

JemallocNodumpAllocator singleton.

goodMallocSize

Simple wrapper around nallocx

greater_than

Safely compares whether lhs is greater than the compile‐time constant rhs.

grow_capacity_by

Grows c to accommodate n additional elements with geometric growth.

hardware_timestamp

Returns a hardware timestamp counter value.

hardware_timestamp_measurement_start

hardware_timestamp_measurement_start hardware_timestamp_measurement_stop

hardware_timestamp_measurement_stop

Ends precise measurement of a region of code and returns a timestamp.

hasSpaceOrCntrlSymbols

Returns if string contains std::isspace or std::iscntrl characters.

hash_value

hash_value overloads

hazard_pointer_clean_up

Reclaim all retired objects in a domain that are no longer protected.

hazard_pointer_default_domain

Access the process‐wide default hazard pointer domain.

hazptr_cleanup

Reclaim all retired objects in a domain that are no longer protected.

hazptr_domain_push_retired

Push a list of retired objects into a domain for later reclamation.

hazptr_retire

Retire an object so it is reclaimed once no hazard pointer protects it.

hazptr_tc_evict

hazptr_tc_evict ‐‐ Used only for benchmarking

hazptr_tc_tls

Access the thread‐local hazard pointer cache.

hazptr_use_executor

Report whether hazard pointer reclamation may use an executor.

hexDump

hexDump overloads

hex_decode_digit

hex_decode_digit

hex_decode_digit_flavor_aarch64

hex_decode_digit_flavor_aarch64

hex_decode_digit_flavor_x86_64

hex_decode_digit_flavor_x86_64

hex_decode_digit_raw

hex_decode_digit_raw

hex_decode_digit_raw_flavor_aarch64

hex_decode_digit_raw_flavor_aarch64

hex_decode_digit_raw_flavor_x86_64

hex_decode_digit_raw_flavor_x86_64

hex_decode_digit_table

hex_decode_digit_table

hex_decoded_digit_is_valid

hex_decoded_digit_is_valid

hex_is_digit

hex_is_digit

hex_is_digit_flavor_aarch64

hex_is_digit_flavor_aarch64

hex_is_digit_flavor_x86_64

hex_is_digit_flavor_x86_64

hex_is_digit_table

hex_is_digit_table

hexlify

hexlify overloads

hint_emplacer

Convenience function to construct a folly::hint_emplace_iterator, analogous to std::inserter().

humanify

humanify overloads

identity

Returns the argument unchanged.

init [deprecated]

Initializes folly (deprecated non‐RAII form).

initLogging

initLogging overloads

initLoggingOrDie

initLoggingOrDie overloads

initializeLoggerDB

initializeLoggerDB() will be called to configure the main LoggerDB singleton the first time that LoggerDB::get() is called.

invocable_to

Wraps the invocable for lazy conversion to its result type.

invoke_cold

invoke_cold overloads

invoke_noreturn_cold [noreturn]

invoke_noreturn_cold

irange

irange overloads

isLogLevelFatal

Returns true if and only if a LogLevel is fatal.

isPowTwo

Return true if and only if v is a power of two.

isSet

Tests whether all flags of b are set in a.

isSuspendedLeafActive

Returns whether the given leaf frame is currently an active suspended leaf.

is_constant_evaluated_or

Reports whether evaluation occurs in a constant context, with a default.

is_negative

Determines whether a value is negative, the same as x < 0.

is_non_negative

Determines whether a value is non‐negative, the same as x >= 0.

is_non_positive

Determines whether a value is non‐positive, the same as x <= 0.

is_positive

Determines whether a value is positive, the same as x > 0.

join

join overloads

kahan_sum

kahan_sum overloads

lazy

Creates a lazy value whose initialization is deferred until first use.

less_than

Safely compares whether lhs is less than the compile‐time constant rhs.

linux_syscall_openat2

linux_syscall_openat2

loadUnaligned

Read an unaligned value of type T and return it.

lock

lock overloads

logConfigToDynamic

logConfigToDynamic overloads

logDisabledHelper

logDisabledHelper overloads

logLevelToString

Get a human‐readable string representing the LogLevel.

ltrim

Specify characters to ltrim.

ltrimWhitespace

Remove leading whitespace.

makeAutoTimer

Creates an AutoTimer with deduced logger and clock types.

makeBitIterator

Helper function, so you can write auto bi = makeBitIterator(container.begin());

makeConversionError

Custom Error Translation

makeDelayedDestructionUniquePtr

Creates a DelayedDestructionUniquePtr owning a new object.

makeDismissedGuard

Create a scope guard in the dismissed state.

makeExpected

For constructing an Expected object from a value, with the specified Error type. Usage is as follows:

makeFixedString

** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 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.

makeGuard

Create a scope guard.

makeMoveWrapper

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.

makeSystemError

makeSystemError overloads

makeSystemErrorExplicit

makeSystemErrorExplicit overloads

makeTryWith

makeTryWith overloads

makeTryWithNoUnwrap

makeTryWithNoUnwrap overloads

makeUnexpected

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:

makeUnpredictable

Hide a value from the optimizer so it cannot shape the following code.

make_array

Constructs a std::array with the given argument list.

make_array_with

Generates a std::array<..., Size> with elements m(i) for i in [0, Size).]

make_atomic_ref

Build an atomic_ref referring to the given object.

make_coded_rich_error

make_coded_rich_error overloads

make_dynamic_view

make_dynamic_view overloads

make_emplace_args

Pack arguments in a tuple for assignment to a folly::emplace_iterator, folly::front_emplace_iterator, or folly::back_emplace_iterator. The iterator's operator= will unpack the tuple and pass the unpacked arguments to the container's emplace function, which in turn forwards the arguments to the (multi‐argument) constructor of the target class.

make_erased_unique

make_erased_unique

make_error_code

Builds a std::error_code from an args‐file expansion error code.

make_exception_ptr_with

make_exception_ptr_with overloads

make_exception_wrapper

Builds an exception_wrapper wrapping a newly constructed exception.

make_hazard_pointer

make_hazard_pointer overloads

make_hazard_pointer_array

make_hazard_pointer_array overloads

make_inheriting_coded_rich_error

make_inheriting_coded_rich_error overloads

make_nestable_coded_rich_error

make_nestable_coded_rich_error overloads

make_not_null_shared

Creates a not_null_shared_ptr, like std::make_shared.

make_not_null_unique

Creates a not_null_unique_ptr, like std::make_unique.

make_optional

make_optional overloads

make_replaceable

make_replaceable overloads

make_std_seed_seq

Constructs a std::seed_seq from the given seed value.

mallctlCall

Invokes a mallctl command that neither reads nor writes a value.

mallctlRead

Reads a value from jemalloc through the named mallctl command.

mallctlReadWrite

Writes a value and reads the previous one through the named mallctl command.

mallctlWrite

Writes a value to jemalloc through the named mallctl command.

manual_safe_callable

Wraps a callable, asserting the given safety level; see manual_safe_callable_t.

manual_safe_ref

Wraps a reference, asserting the given safety level; see manual_safe_ref_t.

manual_safe_val

Wraps a value, asserting the given safety level; see manual_safe_val_t.

manual_safe_with

Wraps the result of fn, asserting the given safety level.

match_empty_function_protocol

match_empty_function_protocol overloads

memory_order_load

The load part of a possibly‐composite memory order.

memory_order_store

The store part of a possibly‐composite memory order.

memrchr

memrchr overloads

merge

merge overloads

midpoint

midpoint overloads

mlock2wrapper

mlock2 is Linux‐only and exists since Linux 4.4 On Linux pre‐4.4 and other platforms fail with ENOSYS. glibc added the mlock2 wrapper in 2.27 https://lists.gnu.org/archive/html/info‐gnu/2018‐02/msg00000.html

mmapFileCopy

Copy a file using mmap(). Overwrites dest.

n_least_significant_bits

Return a value of type T with the n least significant bits set.

n_most_significant_bits

Return a value of type T with the n most significant bits set.

nextPowTwo

Return the smallest power of two that is greater than or equal to v.

object_from_member

object_from_member overloads

openNoInt

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.

operator co_await

Coawait operators

operator""_csv

User‐defined literal building a cstring_view from a string literal.

operator""_fs

** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * User‐defined literals for creating FixedString objects from string literals on the compilers that support it.

operator""_fs128

Creates a FixedString<128> from a string literal.

operator""_fs16

Creates a FixedString<16> from a string literal.

operator""_fs32

Creates a FixedString<32> from a string literal.

operator""_fs4

Creates a FixedString<4> from a string literal.

operator""_fs64

Creates a FixedString<64> from a string literal.

operator""_fs8

Creates a FixedString<8> from a string literal.

operator""_lit

User‐defined literal yielding the literal string value.

operator""_litv

User‐defined literal yielding a value tag of the literal string.

operator""_shellify

Creates a shell command formatter from a string literal.

operator""_sp

operator""_sp overloads

operator""_uzic

operator""_uzic

operator%

Modulus operators

operator%=

operator%=

operator&

Bitwise conjunction operators

operator&=

Intersects a with b in place.

operator*

Multiplies two dynamics.

operator+

Addition operators

operator+=

Add an integer to a LogLevel in place, capping at LogLevel::MAX_LEVEL.

operator‐

Subtraction operators

operator‐=

Subtract an integer from a LogLevel in place.

operator/

Division operators

operator/=

operator/=

operator>>

Right shift operators

operatorˆ

Bitwise‐XORs two dynamics.

operator_delete

operator_delete overloads

operator_new

operator_new overloads

operator|

Bitwise disjunction operators

operator|=

Unions b into a in place.

operator~

Computes the complement of a flag set.

or_unwind_epitaph

or_unwind_epitaph overloads

overload

Combine multiple Cases in one function object

parseJson

Parse a json blob out of a range and produce a dynamic representing it.

parseJson5 [deprecated]

Parse an experimental json5 blob and produce a dynamic representing it.

parseJsonWithMetadata

parseJsonWithMetadata overloads

parseLogConfig

Parse a log configuration string.

parseLogConfigDynamic

Parse a folly::dynamic object.

parseLogConfigJson

Parse a JSON configuration string.

parseNestedCommandLine

parseNestedCommandLine overloads

parseTo

parseTo overloads

partialLoadUnaligned

Read l bytes into the low bits of a value of an unsigned integral type T, where l < sizeof(T).

poly_call

/////////////////////////////////////////////////////////////////////////////

poly_cast

poly_cast overloads

poly_empty

/////////////////////////////////////////////////////////////////////////////

poly_move

/////////////////////////////////////////////////////////////////////////////

poly_type

/////////////////////////////////////////////////////////////////////////////

popAsyncStackFrameCallee

Pop the 'callee' frame off the stack, restoring the parent frame as the current frame.

popcount

popcount

preadFull

Like readFull but reads at a given offset.

preadNoInt

Reads from a file descriptor at an offset, retrying on EINTR.

preadv

Reads into multiple buffers from a file at a given offset.

preadvFull

Like readvFull but scatter‐reads at a given offset.

preadvNoInt

Scatter‐reads from a file descriptor at an offset, retrying on EINTR.

prettyPrint

Pretty printer for numbers with units.

prettyToDouble

prettyToDouble overloads

pretty_name

Returns a statically‐allocated C string containing the pretty name of T.

printResultComparison

Print a comparison between two sets of benchmark results.

processLocalUniqueId

Generates a 64‐bit id that is unique within the process. The returned ids should not be persisted or passed to other processes, and there are no ordering guarantees.

pushAsyncStackFrameCallerCallee

Push the 'callee' frame onto the current thread's async stack, deactivating the 'caller' frame and setting up the 'caller' to be the parent‐frame of the 'callee'.

pwriteFull

Like writeFull but writes at a given offset.

pwriteNoInt

Writes to a file descriptor at an offset, retrying on EINTR.

pwritev

Writes multiple buffers to a file at a given offset.

pwritevFull

Like writevFull but gather‐writes at a given offset.

pwritevNoInt

Gather‐writes to a file descriptor at an offset, retrying on EINTR.

qfind

qfind overloads

qfind_first_of

qfind_first_of overloads

randomNumberSeed

Return a good seed for a random number generator.

range

range overloads

rcu_barrier

Waits for all in‐flight deleters in the domain to complete.

rcu_default_domain

Returns the process‐wide default RCU domain.

rcu_retire

Retires a pointer, invoking its deleter after a grace period.

rcu_synchronize

Waits for all pre‐existing RCU readers in the domain to complete.

readFile

readFile overloads

readFull

Wrapper around read() (and pread()) that, in addition to retrying on EINTR, will loop until all data is read.

readNoInt

Reads from a file descriptor, retrying on EINTR.

readvFull

Like readFull but scatter‐reads into multiple buffers.

readvNoInt

Scatter‐reads from a file descriptor, retrying on EINTR.

reinterpret_function_cast

reinterpret_function_cast overloads

reinterpret_pointer_cast

reinterpret_pointer_cast overloads

reinterpret_span_cast

Casts in to a span of U over the same memory using reinterpret_cast.

relinquish

relinquish overloads

reserve_if_available

Reserves space for n elements when C provides a reserve() member.

reset_once

reset_once overloads

result_catch_all

Wraps the return value from the lambda fn in a result, putting any thrown exception into its "error" state.

result_to_try

Converts a result<T> to a Try<T>.

resumeCoroutineWithNewAsyncStackRoot

resumeCoroutineWithNewAsyncStackRoot overloads

rethrow_current_exception [noreturn]

rethrow_current_exception

rfind

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.

rlock

Make a shared locking helper for a const object.

rref

rref overloads

rtrim

Specify characters to rtrim.

rtrimWhitespace

Remove trailing whitespace.

runBenchmarks

Runs all benchmarks defined. Usually put in main().

runBenchmarksOnFlag

Runs all benchmarks defined if and only if the ‐‐benchmark flag has been passed to the program. Usually put in main().

seed_seq_generate

Fills the destination buffer with data generated from the seed sequence.

select64

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.

setCPUExecutor [deprecated]

methodset Deprecated

setCPUExecutorToGlobalCPUExecutor [deprecated]

methodset Deprecated

setIOExecutor [deprecated]

methodset Deprecated

setKeepAliveObjTraceHooks

Install (or, with all‐null arguments, remove) the keep‐alive object tracing hooks.

setThreadName

setThreadName overloads

setUnsafeMutableGlobalCPUExecutor

methodset Executors

setUnsafeMutableGlobalCPUExecutorToGlobalCPUExecutor

methodset Executors

setUnsafeMutableGlobalIOExecutor

methodset Executors

set_n_least_significant_bits

Set the n least significant bits of x, leaving the others unchanged.

set_n_most_significant_bits

Set the n most significant bits of x, leaving the others unchanged.

set_once

set_once overloads

set_process_phases

Start Regular phase and register handler to set Exit phase. To be called exactly once in each program that uses Folly. Ideally, it is to be called from folly::init(), which in turn is to be called by every program that uses Folly.

setupIoUringBufferPoolSharing

setupIoUringBufferPoolSharing overloads

sformat

sformat overloads

shellQuote

Quotes an argument to make it suitable for use as shell command arguments.

shellify [deprecated]

Create argument array for Subprocess() for a process running in a shell.

shutdownNoInt

Shuts down a socket, retrying on EINTR.

sizedAlignedFree

Free a buffer previously returned by checkedAlignedMalloc.

sizedArrayFree

Free a buffer previously returned by checkedArrayMalloc<T>.

sizedFree

Frees's memory using sdallocx if possible

skipWhitespace

DEPRECATED: Use ltrimWhitespace instead

smartRealloc

Reallocs if there is less slack in the buffer, else performs malloc‐copy‐free.

sourceLocationToString

Formats a source location as "file:line [function]".

split

split overloads

splitFuture

Convenience function, allowing us to exploit template argument deduction to improve readability.

splitTo

split, to an output iterator

splitmix64

splitmix64

stable_radix_sort

stable_radix_sort overloads

stable_radix_sort_descending

stable_radix_sort_descending overloads

stack_epitaph

stack_epitaph overloads

static_pointer_cast

static_pointer_cast overloads

static_span_cast

Casts in to a span of U over the same memory using static_cast.

std_bitset_find_first

Return the index of the first set bit in a bitset, or bitset.size() if none.

std_bitset_find_next

Return the index of the first set bit in a bitset after the given index, or bitset.size() if none.

storeUnaligned

Write an unaligned value of type T.

strictNextPowTwo

Return the smallest power of two that is strictly greater than v.

strictPrevPowTwo

Return the largest power of two that is strictly less than v.

stringAppendf

Append printf‐style output to string.

stringPrintf

stringPrintf overloads

stringToLogLevel

Construct a LogLevel from a string name.

stringVAppendf

Append va_list printf‐style output to string.

stringVPrintf

stringVPrintf overloads

stripLeftMargin

De‐indent a string.

strlcpy

Copy a C string, size‐bounded and always null‐terminated (mimics BSD strlcpy).

swap

swap overloads

sweepSuspendedLeafFrames

Apply fn on all suspended leaf frames. Note: Avoid performing async work within fn as it may cause deadlocks.

synchronized

Acquire locks for multiple Synchronized<> objects, in a deadlock‐safe manner.

tag_invoke

tag_invoke overloads

terminate_with [noreturn]

terminate_with

terminate_with_fmt_format [noreturn]

Formats a message with fmt and terminates with an exception built from it.

test_once

test_once overloads

throwSystemError [noreturn]

Throws a std::system_error from the current errno and components of a string.

throwSystemErrorExplicit [noreturn]

throwSystemErrorExplicit overloads

throw_exception [noreturn]

throw_exception

throw_exception_fmt_format [noreturn]

Formats a message with fmt and throws an exception constructed from it.

to

to overloads

toAppend

toAppend overloads

toAppendDelim

toAppendDelim overloads

toAppendDelimFit

toAppendDelimFit overloads

toAppendFit

toAppendFit overloads

toDelim

toDelim overloads

toDynamic

Turn an arbitrary type into a dynamic.

toJson

Serialize a dynamic into a json string.

toLowerAscii

toLowerAscii overloads

toPrettyJson

Serialize a dynamic into a json string with indentation. Note that the keys of all objects will be sorted.

toStdString

toStdString overloads

toUpperAscii

toUpperAscii overloads

to_ascii_decimal

to_ascii_decimal overloads

to_ascii_lower

to_ascii_lower overloads

to_ascii_size

Number of digits in the base‐Base representation of v.

to_ascii_size_decimal

Number of decimal digits in v; alias of to_ascii_size<10>.

to_ascii_upper

to_ascii_upper overloads

to_ascii_with

to_ascii_with overloads

to_bool

Constructs a boolean from the argument.

to_erased_unique_ptr

to_erased_unique_ptr

to_floating_point

Wraps the argument for floating‐point conversion.

to_integral

Wraps the argument for integral conversion.

to_narrow

Wraps the argument for narrowing conversion.

to_ordering

Convert a signed comparison value into the matching ordering.

to_shared_ptr

to_shared_ptr

to_shared_ptr_aliasing

to_shared_ptr_aliasing overloads

to_shared_ptr_non_owning

to_shared_ptr_non_owning

to_signed

Converts the argument to the corresponding signed type.

to_underlying

Converts an enum value to its underlying type.

to_unsigned

Converts the argument to the corresponding unsigned type.

to_weak_ptr

to_weak_ptr

to_weak_ptr_aliasing

to_weak_ptr_aliasing

transition_lock

Atomically transitions from the from‐lock to the to‐lock, waiting unboundedly for the transition to become available.

transition_to_shared_lock

transition_to_shared_lock overloads

transition_to_unique_lock

Eventually and atomically upgrades an upgrade lock to an exclusive lock.

transition_to_upgrade_lock

Immediately and atomically downgrades an exclusive lock to an upgrade lock.

trim

Specify characters to trim.

trimWhitespace

Remove leading and trailing whitespace.

truncateNoInt

Truncates a file by path, retrying on EINTR.

tryAssign

Try to move the value/exception from another Try object.

tryDecodeVarint

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.

tryEmplace

tryEmplace overloads

tryEmplaceWith

tryEmplaceWith overloads

tryGetCurrentAsyncStackRoot

Get access to the current thread's top‐most AsyncStackRoot.

tryGetShutdownSocketSet

Returns the process‐global shutdown socket set, if one has been installed.

tryGetShutdownSocketSetFast

Returns the process‐global shutdown socket set using a read‐mostly pointer.

trySplitTo

Try to split a string into a fixed number of fields by delimiter, using folly::tryTo<> for conversions. types by delimiter. ‐ On success, all output values will be initialized and the 'Unit{}' value is returned. Arguments are assigned in reverse order. ‐ On failure, the first failing 'ConversionCode' is returned with its associated substring in a 'SubstringConversionCode'. ‐ String splitting is performed prior to each conversion; field values will not contain the delimiter. ‐ All custom error codes are mapped to ConversionCode::CUSTOM.

tryTo

tryTo overloads

tryUriUnescape

tryUriUnescape overloads

try_and_catch

try_and_catch is a convenience for try {} catch(...) {}` that returns an exception_wrapper with the thrown exception, if any.

try_call_once

try_call_once overloads

try_to_result

try_to_result overloads

try_transition_lock

Attempts an atomic transition from the from‐lock to the to‐lock, without waiting if the transition is not immediately available.

try_transition_lock_for

Attempts an atomic transition from the from‐lock to the to‐lock, waiting up to the given timeout for the transition to become available.

try_transition_lock_until

Attempts an atomic transition from the from‐lock to the to‐lock, waiting up to the given deadline for the transition to become available.

try_transition_to_unique_lock

try_transition_to_unique_lock overloads

try_transition_to_unique_lock_for

try_transition_to_unique_lock_for overloads

try_transition_to_unique_lock_until

try_transition_to_unique_lock_until overloads

try_transition_to_upgrade_lock

Immediately attempts to atomically upgrade a shared lock to an upgrade lock.

try_transition_to_upgrade_lock_for

Attempts, up to a timeout, to atomically upgrade a shared lock to an upgrade lock.

try_transition_to_upgrade_lock_until

Attempts, up to a deadline, to atomically upgrade a shared lock to an upgrade lock.

type_info_of

type_info_of overloads

ulock

Make an upgrade locking helper.

unSet

Clears the flags of b from a.

uncaught_exceptions

uncaught_exceptions

uncurry

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.

unexpected

Disambiguation tag for constructing an Expected in the error state.

unhexlify

unhexlify overloads

unicode_code_point_from_utf16_surrogate_pair

Combines a UTF‐16 surrogate pair into a single code point.

unicode_code_point_to_utf8

Encodes a single Unicode code point into a UTF‐8 byte sequence.

unique_hash_key_algo_strong_sha256

Hash the input items with SHA256, returning a Size‐byte digest.

unsafe_unscoped_init

Initializes folly without an RAII scope guard.

unwrapTryTuple

Unwrap a tuple of Try values into a tuple of values.

uriEscape

uriEscape overloads

uriUnescape

uriUnescape overloads

usingJEMalloc

Determines whether the process is using jemalloc.

usingTCMalloc

Determines whether the process is using tcmalloc.

utf16_code_unit_is_bmp

Returns whether a UTF‐16 code unit lies in the Basic Multilingual Plane.

utf16_code_unit_is_high_surrogate

Returns whether a UTF‐16 code unit is a high surrogate.

utf16_code_unit_is_low_surrogate

Returns whether a UTF‐16 code unit is a low surrogate.

utf8ToCodePoint

Decode a single Unicode code point from UTF‐8 byte sequence.

uuid_parse

uuid_parse overloads

uuid_parse_buffer_to_buffer

Parses a 36‐byte UUID string into a 16‐byte buffer.

valid_align_value

Returns whether the given alignment value is valid.

validateSocketOptions

Returns the subset of options that apply to the given family and position.

variadic_noop

Does nothing regardless of the arguments passed.

variant_match

variant_match overloads

wlock

wlock overloads

writeFile

writeFile overloads

writeFileAtomic

writeFileAtomic overloads

writeFileAtomicNoThrow

writeFileAtomicNoThrow overloads

writeFull

Similar to readFull and preadFull above, wrappers around write() and pwrite() that loop until all data is written.

writeNoInt

Writes to a file descriptor, retrying on EINTR.

writevFull

Like writeFull but gather‐writes from multiple buffers.

writevNoInt

Gather‐writes to a file descriptor, retrying on EINTR.

x86_cpuid

x86_cpuid

x86_cpuid_get_cache_info

Returns cache info for the cache with the given id for the given vendor.

x86_cpuid_get_llc_cache_info

x86_cpuid_get_llc_cache_info overloads

x86_cpuid_get_vendor

Detects the CPU vendor via the cpuid instruction.

x86_cpuid_max

Returns the maximum supported cpuid leaf for the given leaf group.

xlogIsDirSeparator

Tests whether a character is a directory separator.

xlogStripFilename

Strip directory prefixes from a filename before using it in XLOG macros.

operator<<

Left shift operators

operator==

Equality operators

operator!=

Inequality operators

operator<

Less‐than operators

operator<=

Less‐than‐or‐equal operators

operator>

Greater‐than operators

operator>=

Greater‐than‐or‐equal operators

operator<=>

Three‐way comparison operators

Variables

Name

Description

adopt_lock_state

Tag value indicating that a lock transition should adopt existing lock state.

always_false

always_false

atomic_fetch_flip

Customization point object that flips a bit and returns its previous value.

atomic_fetch_modify

Customization point object that atomically transforms an atomic value.

atomic_fetch_reset

Customization point object that resets a bit and returns its previous value.

atomic_fetch_set

Customization point object that sets a bit and returns its previous value.

atomic_notify_all

Wakes all threads waiting on the atomic, like futex wake with max count.

atomic_notify_one

Wakes one thread waiting on the atomic, like futex wake with count 1.

atomic_wait

Blocks until the atomic changes from an expected value, like futex wait.

atomic_wait_until

Blocks until the atomic changes or a deadline passes, returning cv_status.

available_concurrency_max_env

The environment variable name used to cap available_concurrency().

cacheline_align_v

A value corresponding to hardware_constructive_interference_size but which may be used with alignas, since hardware_constructive_interference_size may be too large on some platforms to be used with alignas.

constexpr_iterated_squares_desc_2_v

constexpr_iterated_squares_desc_2_v

constexpr_iterated_squares_desc_size_v

constexpr_iterated_squares_desc_size_v

constexpr_iterated_squares_desc_v

constexpr_iterated_squares_desc_v

default_domain

Global default domain defined in Hazptr.cpp

demangle_max_symbol_size

Maximum symbol size that demangling will attempt, or 0 for no limit.

emptySocketOptionMap

An empty socket option map.

empty_try_as_error

The empty‐`Try`‐as‐error policy value.

factory_constructor

Tag value selecting the factory constructor of Indestructible.

fmt_vformat_mangle_format_string

Callable that mangles the content of vformat format‐strings.

format_string_for_each_named_arg

Callable object enumerating the named arguments of a format string.

function_arguments_size_v

The number of arguments in the given function type.

function_is_nothrow_v

True precisely when the given function type is marked noexcept.

function_is_variadic_v

True precisely when the given function type is C‐style variadic.

hardware_constructive_interference_size

The cache line size for true sharing, from the standard library.

hardware_destructive_interference_size

The minimum spacing to avoid false sharing, from the standard library.

has_extended_alignment

has_extended_alignment

hex_alphabet_lower

hex_alphabet_lower

hex_alphabet_table

hex_alphabet_table

hex_alphabet_upper

hex_alphabet_upper

initlist_construct

Tag value used to disambiguate initializer‐list construction.

is_allocator_v

is_allocator_v is_allocator

is_applicable_r_v

True if applying F to the elements of Tuple yields a result convertible to R.

is_applicable_v

True if F is invocable with the elements of Tuple.

is_arithmetic_v

A trait variable that is true when T is an arithmetic type.

is_bounded_array_v

is_bounded_array_v is_bounded_array

is_bounded_array_v

A specialization of is_bounded_array_v for bounded array types.

is_cleanup_v

True when T models the async cleanup concept (has a conforming cleanup()).

is_complete_v

See is_complete.

is_constexpr_default_constructible_v

is_constexpr_default_constructible_v is_constexpr_default_constructible

is_contiguous_range_v

True when R is a contiguous range.

is_coro_aware_mutex_v

Whether a type declares a folly_coro_aware_mutex nested typedef.

is_detected_v

A trait variable to test whether a metafunction succeeds in substitution.

is_enable_master_from_this_v

True if T publicly derives from EnablePrimaryFromThis.

is_hashable_v

Checks that the given hasher template's specialization for the given type is usable with the standard library containters, for example std::unordered_set<T, Hasher<T>>.

is_hasher_usable_v

Checks the requirements that the Hasher class must satisfy in order to be used with the standard library containers, for example std::unordered_set<T, Hasher>.

is_heap_vector_map_v

True if T is an instantiation of heap_vector_map.

is_heap_vector_set_v

True if T is an instantiation of heap_vector_set.

is_instantiation_of_v

is_instantiation_of_v is_instantiation_of instantiated_from uncvref_instantiated_from

is_instantiation_of_v

A specialization of is_instantiation_of_v for matching instantiations.

is_integral_v

A trait variable that is true when T is an integral type.

is_invocable_r_v

True if invoking F yields a result convertible to R; mimics std::is_invocable_r_v.

is_invocable_v

True if F is invocable with A...; mimics std::is_invocable_v.

is_non_bool_integral_v

is_non_bool_integral_v

is_nothrow_applicable_r_v

True if the nothrow application of F to Tuple yields a result convertible to R.

is_nothrow_applicable_v

True if F is nothrow‐invocable with the elements of Tuple.

is_nothrow_invocable_r_v

True if a nothrow invocation of F yields a result convertible to R; mimics std::is_nothrow_invocable_r_v.

is_nothrow_invocable_v

True if F is nothrow‐invocable with A...; mimics std::is_nothrow_invocable_v.

is_nothrow_tag_invocable_r_v

True if a nothrow tag_invoke call yields a result convertible to R.

is_nothrow_tag_invocable_v

True if the tag_invoke CPO is nothrow‐invocable with Tag and Args.

is_one_of_v

A trait variable that is true when T is one of the types Ts.

is_register_pass_v

is_register_pass_v

is_register_pass_v

Whether an lvalue reference may be passed in a register; always true.

is_register_pass_v

Whether an rvalue reference may be passed in a register; always true.

is_signed_v

A trait variable that is true when T is a signed type.

is_small_sorted_vector_map_v

True if T is a sorted_vector_map backed by a small_vector.

is_small_sorted_vector_set_v

True if T is a sorted_vector_set backed by a small_vector.

is_small_vector_v

true if T is a specialization of folly::small_vector.

is_sorted_vector_map_v

True if T is a sorted_vector_map specialization.

is_sorted_vector_set_v

True if T is a sorted_vector_set specialization.

is_tag_invocable_r_v

True if a tag_invoke call yields a result convertible to R.

is_tag_invocable_v

True if the tag_invoke CPO can be invoked with Tag and Args.

is_transparent_v

is_transparent_v is_transparent

is_unbounded_array_v

is_unbounded_array_v is_unbounded_array

is_unbounded_array_v

A specialization of is_unbounded_array_v for unbounded array types.

is_unsigned_v

A trait variable that is true when T is an unsigned type.

is_vector_bool_reference_v

True when T is the proxy reference type of a std::vector<bool>.

is_vector_bool_reference_v

Specialization recognizing the libc++ std::vector<bool> bit reference.

iterator_category_matches_v

Whether an iterator's category matches Category (std::input_iterator_tag, std::output_iterator_tag, etc). Defined for non‐iterator types as well.

iterator_has_known_distance_v

Whether std::distance over a pair of iterators is reasonably known to give the distance without advancing the iterators or copies of them.

iterator_has_known_distance_v

Specialization for a matching iterator and sentinel type.

kClangVerMajor

The Clang major version, or zero when not compiling with Clang.

kCoreCachedSharedPtrDefaultMaxSlots

Default maximum number of core‐local slots used by the cached pointers.

kCpplibVer

The Dinkumware cpplib version, or zero when not using cpplib.

kDefaultLogLevel

The default log level used when none is specified.

kGlibcxxAssertions

True when libstdc++ assertions are enabled.

kGlibcxxVer

The libstdc++ release version, or zero when not using libstdc++.

kGnuc

The GCC major version, or zero when not compiling with GCC.

kHasExceptions

True when the current build supports C++ exceptions.

kHasRtti

True when run‐time type information (RTTI) is enabled for this build.

kHasUnalignedAccess

True when the target platform supports unaligned loads and stores.

kHasWeakSymbols

True when the toolchain supports weak symbols.

kIntegerDivisionGivesRemainder

True if integer division on this platform yields a remainder, i.e. the hardware division instruction produces both quotient and remainder.

kIovMax

Maximum number of iovec buffers accepted by a scatter/gather call.

kIsAndroid

True when the target operating system is Android.

kIsApple

True when the target operating system is an Apple platform.

kIsAppleIOS

True when the target Apple platform is iOS.

kIsAppleMacOS

True when the target Apple platform is macOS.

kIsAppleTVOS

True when the target Apple platform is tvOS.

kIsAppleWatchOS

True when the target Apple platform is watchOS.

kIsArchAArch64

True when targeting the 64‐bit ARM (AArch64) architecture.

kIsArchAmd64

True when targeting the 64‐bit x86 (amd64) architecture.

kIsArchArm

True when targeting the 32‐bit ARM architecture.

kIsArchPPC64

True when targeting the 64‐bit PowerPC architecture.

kIsArchRISCV64

True when targeting the 64‐bit RISC‐V architecture.

kIsArchS390X

True when targeting the 64‐bit IBM Z (s390x) architecture.

kIsArchWasm

True when targeting WebAssembly.

kIsArchWasm32

True when targeting 32‐bit WebAssembly.

kIsArchWasm64

True when targeting 64‐bit WebAssembly.

kIsArchX86

True when targeting the 32‐bit x86 architecture.

kIsBigEndian

True when the target platform is big‐endian.

kIsClang

True when compiling with Clang.

kIsDebug

True when the current build is a debug build.

kIsFreeBSD

True when the target operating system is FreeBSD.

kIsGlibcxx

True when the standard library is GNU libstdc++.

kIsLibcpp

True when the standard library is LLVM libc++.

kIsLibrarySanitizeAddress

True when folly itself was compiled with AddressSanitizer enabled.

kIsLibstdcpp

True when the standard library is GNU libstdc++.

kIsLinux

True when the target operating system is non‐mobile Linux.

kIsLinuxActual

True when the target operating system is Linux, mobile included.

kIsLittleEndian

True when the target platform is little‐endian.

kIsMobile

True when targeting a mobile platform.

kIsObjC

True when the current translation unit is compiled as Objective‐C.

kIsOptimize

True when the current build is optimized.

kIsOptimizeSize

True when the current build is optimized for size.

kIsSanitize

True when the current build uses any sanitizer.

kIsSanitizeAddress

True when the current build uses AddressSanitizer.

kIsSanitizeDataflow

True when the current build uses DataFlowSanitizer.

kIsSanitizeThread

True when the current build uses ThreadSanitizer.

kIsWindows

True when the target operating system is Windows.

kLoggingEnvVarName

Environment variable name that controls folly logging configuration.

kLoggingMinLevel

The compile‐time minimum log level below which XLOG() statements compile out.

kMaxVarintLength32

Maximum length (in bytes) of the varint encoding of a 32‐bit value.

kMaxVarintLength64

Maximum length (in bytes) of the varint encoding of a 64‐bit value.

kMicrosoftAbiVer

The Microsoft ABI version, or zero when not targeting the Microsoft ABI.

kMinFatalLogLevel

The lowest log level considered fatal for the current build.

kMinValidAddress

The lowest address that may be a valid mapped pointer on this platform.

kMscVer

The MSVC compiler version, or zero when not compiling with MSVC.

kWordSize

Number of bits in a machine word used by the bitset scanning routines.

kWriteFlagsForTimestamping

Write flags that are related to timestamping.

lenient_safe_alias_of_v

The safe_alias level of T, defaulting unannotated types to maybe_value.

loop_break

Return value that tells for_each to stop iterating.

loop_continue

Return value that tells for_each to continue iterating.

match_safely_invocable_as_protocol_v

True if F matches the safely‐invocable‐as protocol for signature Sig.

match_static_lambda_protocol_v

True if type F matches the static‐lambda protocol (empty and trivially copyable).

max_align_v

max_align_v is the alignment of max_align_t.

none

Constant tag used to clear or construct an empty Optional.

npos

The sentinel value returned by search functions when no match is found.

range_has_known_distance_v

Whether std::distance over the begin and end iterators is reasonably known to give the distance without advancing the iterators or copies of them.

rcu_default_domain_

The pointer to the process‐wide default RCU domain.

register_pass_max_size

register_pass_max_size

require_sizeof

require_sizeof

resizeWithoutInitialization

Resizes a container without initializing newly added elements.

sig

Pseudo‐function template handy for disambiguating function overloads.

sorted_equivalent

Tag value indicating a container is sorted but not necessarily unique.

sorted_unique

Tag value indicating a container is sorted and unique.

stopped_result

The stopped/cancellation signal value.

strict_safe_alias_of_v

The safe_alias level of T, defaulting unannotated types to unsafe.

tag

A generic type‐list value.

to_ascii_size_max

Maximum buffer size to hold the base‐Base ASCII form of any value of unsigned type Int.

to_ascii_size_max_decimal

Maximum buffer size for the decimal ASCII form of Int; alias of to_ascii_size_max<10>.

type_list_find_v

type_list_find_v

type_list_size_v

type_list_size_v

type_pack_find_v

type_pack_find_v

type_pack_size_v

type_pack_size_v

unique_hash_key_algo_size_v

Digest size in bytes produced by the given hash algorithm object.

unit

The single value of type Unit.

unsafe_default_initialized

Object yielding a default‐initialized value on conversion.

value_list_element_v

value_list_element_v

value_list_size_v

value_list_size_v

value_pack_element_v

value_pack_element_type_t

value_pack_size_v

value_pack_size_v

variadic_constant_of

An invocable object that ignores its arguments and returns a constant.

vtag

A generic value‐list value.

x86_cpuid_vendor_names

Vendor identification strings indexed by x86_cpuid_vendor.

Concepts

Name

Description

FollyFindFixedSupportedType

Concept for types supported by folly::findFixed: fixed‐width integers and enums with such an underlying type.

IsOptionalLike

Concept matching types with optional‐like semantics (has_value/value), such as std::optional, folly::Optional, and Thrift optional fields.

instantiated_from

A concept satisfied when T is an instantiation of the class template Templ.

is_strong

Satisfied when T derives from strong instantiated with its own tag.

passable_to

passable_to

uncvref_instantiated_from

Like instantiated_from, but after stripping cvref qualifiers from T.

uncvref_same_as

Concept to check that a type is same as a given type, when stripping qualifiers and refernces. Especially useful for perfect forwarding of a specific type.

vector_bool_reference

Concept satisfied by the proxy reference type of a std::vector<bool>.

Using Declarations

Name

Description

FlagSaver

Imported gflags::FlagSaver.

IsEqualityComparable

A trait to test whether values of T and U can be compared with operator==.

IsLessThanComparable

A trait to test whether values of T and U can be compared with operator<.

MoveOnly

Base that disallows copy but allows move in derived types.

NonCopyableNonMovable

Base that disallows both copy and move in derived types.

apply

///////////////////////////////////////////////////////////////////

decay_t

Like std::decay_t but possibly faster to compile.

dynamic_extent

Sentinel extent value marking a span whose size is known only at runtime.

invoke_result_t

The result type of invoking F with A...; mimics std::invoke_result_t.

is_nothrow_convertible

A trait type that is true when one type is nothrow‐convertible to another.

is_nothrow_convertible_v

A trait variable that is true when one type is nothrow‐convertible to another.

nextafter

Most platforms hopefully provide std::nextafter, std::remainder.

remainder

Imported std::remainder.

shared_lock

Alias to std::shared_lock.

tag_invoke_result_t

The result type of invoking the tag_invoke CPO with Tag and Args.

unique_lock

Alias to std::unique_lock.

Created with MrDocs