Namespace for bit‐level utility functions.

Namespaces

Name

Description

PrintMethods

This namespace contains parameterized print methods having the standard BDE signature for such methods.

Types

Name

Description

AlgorithmWorkaroundUtil

A namespace for replacement workarounds for some platform supplied faulty algorithms (particularly for the Sun Studio compiler).

ArrayUtil

This struct provides a namespace for a collection of function templates providing access to the length and iterators of statically sized built‐in arrays

BigEndianInt16

This class provides a container for an in‐core representation of a signed 16‐bit big‐endian integer. It supports a complete set of value semantic operations, including copy construction, assignment, equality comparison, bsl::ostream printing, and BDEX serialization. Note that the copy constructor and copy‐assignment operator are provided by the compiler. Any object of this class can be converted to a short allowing comparison with any other object of this class. This class is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing object, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.

BigEndianInt32

This class provides a container for an in‐core representation of a signed 32‐bit big‐endian integer. It supports a complete set of value semantic operations, including copy construction, assignment, equality comparison, bsl::ostream printing, and BDEX serialization. Note that the copy constructor and copy‐assignment operator are provided by the compiler. Any object of this class can be converted to an int allowing comparison with any other object of this class. This class is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing object, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.

BigEndianInt64

This class provides a container for an in‐core representation of a signed 64‐bit big‐endian integer. It supports a complete set of value semantic operations, including copy construction, assignment, equality comparison, bsl::ostream printing, and BDEX serialization. Note that the copy constructor and copy‐assignment operator are provided by the compiler. Any object of this class can be converted to an Int64 allowing comparison with any other object of this class. This class is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing object, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.

BigEndianUint16

This class provides a container for an in‐core representation of an unsigned 16‐bit big‐endian integer. It supports a complete set of value semantic operations, including copy construction, assignment, equality comparison, bsl::ostream printing, and BDEX serialization. Note that the copy constructor and copy‐assignment operator are provided by the compiler. Any object of this class can be converted to an unsigned short allowing comparison with any other object of this class. This class is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing object, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.

BigEndianUint32

This class provides a container for an in‐core representation of an unsigned 32‐bit big‐endian integer. It supports a complete set of value semantic operations, including copy construction, assignment, equality comparison, bsl::ostream printing, and BDEX serialization. Note that the copy constructor and copy‐assignment operator are provided by the compiler. Any object of this class can be converted to an unsigned int allowing comparison with any other object of this class. This class is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing object, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.

BigEndianUint64

This class provides a container for an in‐core representation of an unsigned 64‐bit big‐endian integer. It supports a complete set of value semantic operations, including copy construction, assignment, equality comparison, bsl::ostream printing, and BDEX serialization. Note that the copy constructor and copy‐assignment operator are provided by the compiler. Any object of this class can be converted to a Uint64 allowing comparison with any other object of this class. This class is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing object, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.

BitMaskUtil

This utility struct provides a namespace for a set of bit‐level, stateless functions that take one or two int arguments and return masks of the built‐in 32‐ and 64‐bit integer types uint32_t and uint64_t, respectively.

BitStringImpUtil

This struct provides a namespace for static functions to be used solely in the implementation of BitStringUtil. The "Manipulators" are intended to be provided as arguments to templates in bdlb_bitstringutil, whereas the "Accessors" are to be called directly within that component.

BitStringUtil

This struct provides a namespace for a suite of static functions to manipulate and access sequences of bits stored in an array of uint64_t (also known as a "bit string"; see {The "Bit String" Pseudo‐Type}).

BitUtil

This utility struct provides a namespace for a set of bit‐level, stateless functions that operate on the built‐in 32‐ and 64‐bit unsigned integer types.

CStringEqualTo

This struct defines a comparison functor on null‐terminated character strings, enabling them for use as keys in the standard unordered associative containers such as bsl::unordered_map and bsl::unordered_set. Note that this class is an empty POD type.

CStringHash

This struct defines a hash operation for null‐terminated character strings enabling them to be used as keys in the standard unordered associative containers such as bsl::unordered_map and bsl::unordered_set. Note that this class is an empty POD type.

CStringLess

This struct defines an ordering on null‐terminated character strings, enabling them for use as keys in the standard associative containers such as bsl::map and bsl::set. Note that this class is an empty POD type.

CaselessStringViewEqualTo

This struct defines a case‐insensitive equality comparison functor on string views, enabling them for use as keys in the standard unordered associative containers such as bsl::unordered_map and bsl::unordered_set. Note that this class is an empty POD type.

CaselessStringViewHash

This struct defines a hash operation for string views enabling bsl::string`s or `bsl::string_view`s to be used as keys in the standard unordered associative containers such as `bsl::unordered_map and bsl::unordered_set. Note that this class is an empty POD type.

CaselessStringViewLess

This struct defines an ordering on string views, enabling them for use as keys in the standard associative containers such as bsl::map and bsl::set. Note that this class is an empty POD type.

CharType

This struct provides a namespace for a suite of pure procedures operating on the fundamental type char.

ConstNullableValueRef

This class is a wrapper for either a bsl::optional or NullableAllocatedValue, and provides non‐modifiable access to the wrapped object.

DoubleCompareUtil

This struct provides a namespace for a suite of fuzzy (equality and relational) comparison functions on pairs of double values, parameterized by (optionally specified) relative and absolute tolerances. Note that all methods are naturally thread‐safe, and well‐behaved for all tolerance values.

Float

Namespace for floating‐point classification types and functions.

FunctionOutputIterator

Provide an output iterator that calls an object of the (template parameter) type FUNCTION. If FUNCTION is a functor, de‐referencing this iterator and assigning to the result (of dereferencing) will call the operator() of the functor with the assigned value as a parameter. Similarly, if FUNCTION if a function pointer type, assigning to the dereferenced iterator will call the function supplied at construction with the assigned value as a parameter.

Guid

This class implements a value‐semantic Guid type. Each object represents an unconstrained Guid object, but its uniqueness is not guaranteed, and this component provides no ability to generate a GUID.

GuidUtil

This struct provides a namespace for functions that create Universally Unique Identifiers per RFC 4122 (http://www.ietf.org/rfc/rfc4122.txt).

Guid_BslFmtFormatterImpl

This component‐private class template provides the implementation of the bsl::formatter specialization for bdlb::Guid values. The specified t_CHAR template parameter determines both the format‐string and the output character type. The behavior is undefined unless t_CHAR is char or wchar_t.

HasPrintMethod

A class, TYPE, should specialize this trait to derive from true_type if it has a print method with the following signature: ` bsl::ostream& print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const; `

HashUtil

This struct provides a namespace for hash functions.

IndexSpan

A constrained attribute type that represents a position and a length. The constraint is that the sum of the position and length attributes must be representable by the bsl::size_t type.

IndexSpanStringUtil

This struct serves as a namespace for utility functions that operate on IndexSpan and string objects.

IndexSpanUtil

This struct serves as a namespace for utility functions that operate on IndexSpan objects.

LiteralUtil

This struct provides a namespace for utility routines that operate on (programming language) literals.

NullOutputIterator

Provide an output iterator that ignores the output that is provided. De‐referencing an iterator and assigning to the returned value has no effect.

NullOutputIteratorAssignmentProxy

Provide an object that can appear on the left side of an assignment from TYPE. The operation AssignmentProxy() = TYPE() is valid and has no effect.

NullableAllocatedValue

This template class extends the set of values of its value‐semantic TYPE parameter to include the notion of a "null" value. If TYPE is fully value‐semantic, then the augmented type NullableAllocatedValue<TYPE> will be as well. In addition to supporting all homogeneous value‐semantic operations, conversions between comparable underlying value types is also supported. Two nullable objects with different underlying types compare equal if their underlying types are comparable and either (1) both objects are null or (2) the non‐null values compare equal. Attempts to copy construct, copy assign, or compare incompatible values types will fail to compile. The NullableAllocatedValue template can be instantiated on an incomplete type, but it cannot be instantiated on a type that overloads operator&.

NullableAllocatedValue_PointerBitsPair

This is a component‐private class. Do not use.

NullableValue

This template class extends the set of values of its value‐semantic TYPE parameter to include the notion of a "null" value. If TYPE is fully value‐semantic, then the augmented type NullableValue<TYPE> will be as well. In addition to supporting all homogeneous value‐semantic operations, conversions between comparable underlying value types is also supported. Two nullable objects with different underlying types compare equal if their underlying types are comparable and either (1) both objects are null or (2) the non‐null values compare equal. A null nullable object is considered ordered before any non‐null nullable object. Attempts to copy construct, copy assign, or compare incompatible values types will fail to compile. The NullableValue template cannot be instantiated on an incomplete type, a type that overloads unary operator&, or bsl::nullopt_t.

NullableValueRef

This class is a wrapper for either a bsl::optional or NullableAllocatedValue, and provides modifiable access to the wrapped object.

NullableValue_WithAllocator

Component‐private base for allocator‐aware NullableValue specializations.

NullableValue_WithoutAllocator

Component‐private base for non‐allocator‐aware NullableValue specializations.

NumericParseUtil

This struct provides a namespace for a suite of stateless procedures that perform parsing functionality for numbers.

OptionalPrinter

Utility for printing bsl::optional to standard output streams. This class has operator<< defined for it, so it can be used, for example, in ball logs.

OptionalPrinterUtil

This utility struct provides a namespace for a function that creates a bdlb::OptionalPrinter with its template argument deduced from a given instance of bsl::optional.

PairUtil

This struct provides a namespace for the functions that make working with bsl::pair‐like containers more convenient or adapting such containers to work with standard library utilities.

PcgRandomGenerator

This class implements a random number generator (RNG) based on the PCG algorithm.

Print

Provide a namespace for the interface to a suite of procedural stream operations.

PrintAdapter

This class provides an object that may be streamed with operator<< to give full control of the indentation format of the streaming.

PrintAdapterUtil

Utility for constructing a PrintAdapter without naming its template argument (useful in C++03; CTAD can replace this in C++17+).

PrintMethods_Imp<TYPE, bslmf::SelectTraitCase<>>

Component‐private struct. Do not use outside of this component. This struct provides a print function that prints objects of parameterized TYPE that do not declare any of the traits recognized by this component.

PrintMethods_Imp<TYPE, bslmf::SelectTraitCase<HasPrintMethod>>

Component‐private struct. Do not use outside of this component. This struct provides a print function that prints objects of the parameterized TYPE that are associated with the HasPrintMethod trait.

PrintMethods_Imp<TYPE, bslmf::SelectTraitCase<HasStlIterators>>

Component‐private struct. Do not use outside of this component. This struct provides a print function that prints objects of the parameterized TYPE that have the bslalg::HasStlIterators trait declared.

PrintMethods_Imp<TYPE, bslmf::SelectTraitCase<IsPair>>

Component‐private struct. Do not use outside of this component. This struct provides a print function that prints objects of parameterized TYPE that declare the bslmf::IsPair trait.

PrintStringHexDumper

Utility for hex dumping a blob to standard output streams. This class has operator<< defined for it, so it can be used as follows: ` bsl::vector<char> blob; blob.resize(1024);

PrintStringSingleLineHexDumper

Utility for hex dumping a string with no extra formatting to standard output streams. This class has operator<< defined for it, so it can be used as follows: ` bsl::string str;

Random

This struct provides a namespace for a suite of functions used for random‐number generation.

RandomDevice

This struct provides a namespace for a suite of functions used for acquiring random numbers from the system.

ScopeExit

ScopeExit is a general‐purpose scope proctor class template that is intended to be used as an automatic (stack) variable that calls an exit function upon its destruction (when its scope is exited).

ScopeExitUtil

A utility that provides a factory function for sufficiently function C++11 or later platforms to create scope guards using the type‐deducing auto keyword. Notice that the utility type does not exist on C++03 platforms.

String

This struct provides a namespace for a suite of functions on STL‐style strings (bsl::string, std::string, std::pmr::string), C‐style strings, and strings specified by a (const char *, int) or (char *, int) pair.

StringRefUtil

This struct provides a namespace for a suite of functions on bslstl::StringRef references to strings.

StringViewUtil

This struct provides a namespace for a suite of functions on bsl::string_view containers.

Tokenizer

This class provides (read‐only) sequential access to tokens delimited by two user‐supplied character sets consisting, respectively, of soft and hard delimiters characters. Access to the previous and current (trailing) delimiter, as well as to the current token itself, is provided efficiently via bslstl::StringRef.

TokenizerIterator

This class provides a C++‐standards‐conforming input iterator over the tokens in the input string suppled at construction (along with the designation of soft and hard delimiter characters) to a Tokenizer object. Tokens are returned, using a bslstl::StringRef ‐‐ by value ‐‐ that means the iterated references remain valid until the underlying input string itself is modified or destroyed. Note that all iterators are invalidated whenever the input string in the parent Tokenizer change.

Tokenizer_Data

This component‐private class is used to hold delimiter information. Each Tokenizer object will have, as a private data member, an object of this class, and will pass the address of that member to the (private) constructor of each TokenizerIterator object it issues: ` +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ | ,‐‐‐‐‐‐‐‐‐‐‐‐‐‐. | | ( Tokenizer_Data ) | | `‐‐‐‐‐‐‐‐‐‐‐‐‐‐'\ | | | | | | ,‐‐‐‐*‐‐‐‐‐‐‐‐‐‐‐‐. | | | ( TokenizerIterator ) | | | /`‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐' | | | / | | ,‐‐‐‐*‐‐o‐. | | ( Tokenizer ) | | `‐‐‐‐‐‐‐‐‐' | +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ bdlb_tokenizer `

Tokenizer_Proxy

This class provides a proxy holder of a reference to a TokernizerIterator object, allowing correct return of operator‐>.

TopologicalSortUtil

This struct TopologicalSortUtil provides a namespace for topological sorting functions.

TopologicalSortUtilEdgeTraits

This struct represents a customization point allowing clients to supply input iterators to sort having a value_types other than a bsl::pair. Clients may specialize TopologicalSortUtilEdgeTraits to supply the following: ` /// The type of the directed connection from one node to another /// bsl::pair<NodeType, NodeType> and std::pair<NodeType> work /// without TopologicalSortUtilEdgeTraits specialization. typedef EDGE_TYPE EdgeType;

TopologicalSortUtil_Helper

This class template provides data structures required to sort the partial unsorted edges into a total ordered set of nodes. The value type of the nodes(*) must be hashable and equality comparable by bsl::hash, and bsl::equal_to respectively.

TransformIterator

The transform iterator class itself. Its job is to hold a functor and an iterator, pass through all iterator‐related operations to the held iterator, and on dereference, call the functor on the result of dereferencing the iterator and return the result of the call instead.

TransformIteratorUtil

This struct provides a namespace for a function template that simplifies the creation of TransformIterator objects by allowing type deduction to discover the types of the functor and underlying iterator.

TransformIterator_AllocatorOfFunctorMethod

The TransformIterator_AllocatorOfFunctorMethod class template has an allocator method when its boolean template parameter is true, which will be made to be the case when the iterator of the transform iterator does not use allocators and the functor of the transform iterator uses allocators. The transform iterator type itself is supplied as BASE_TYPE.

TransformIterator_AllocatorOfIteratorMethod

The TransformIterator_AllocatorOfIteratorMethod class template has an allocator method when its boolean template parameter is true, which will be made to be the case when the iterator of the transform iterator uses allocators. The transform iterator type itself is supplied as BASE_TYPE.

TransformIterator_Traits

This component‐private class defines various types that are used in the implementation of the transform iterator.

TransparentEqualTo

This struct defines an equality of objects of different types, enabling them for use for heterogeneous comparison in the standard associative containers such as bsl::unordered_map. Note that this class is an empty POD type.

TransparentHash

This struct defines a hash operation for different types, enabling them for use for heterogeneous lookup in the standard associative containers such as bsl::unordered_map. Note that this class is an empty POD type.

TransparentLess

This struct defines an ordering on objects of different types, enabling them for use for heterogeneous comparison in the standard associative containers such as bsl::map and bsl::set. Note that this class is an empty POD type.

TransparentStringHash

This struct defines a hash operation for different string types, enabling them for use for heterogeneous lookup in the standard associative containers such as bsl::unordered_map. Note that this class is an empty POD type.

TypeTraitHasPrintMethod

A class should declare this trait if it has a print method with the following signature: ` bsl::ostream& print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const; `

Variant

Variant10

This class is a "specialization" of Variant for a fixed number (10) of types. Its 10 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A10>.

Variant11

This class is a "specialization" of Variant for a fixed number (11) of types. Its 11 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A11>.

Variant12

This class is a "specialization" of Variant for a fixed number (12) of types. Its 12 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A12>.

Variant13

This class is a "specialization" of Variant for a fixed number (13) of types. Its 13 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A13>.

Variant14

This class is a "specialization" of Variant for a fixed number (14) of types. Its 14 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A14>.

Variant15

This class is a "specialization" of Variant for a fixed number (15) of types. Its 15 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A15>.

Variant16

This class is a "specialization" of Variant for a fixed number (16) of types. Its 16 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A16>.

Variant17

This class is a "specialization" of Variant for a fixed number (17) of types. Its 17 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A17>.

Variant18

This class is a "specialization" of Variant for a fixed number (18) of types. Its 18 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A18>.

Variant19

This class is a "specialization" of Variant for a fixed number (19) of types. Its 19 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A19>.

Variant2

This class is a "specialization" of Variant for a fixed number (2) of types. Its 2 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2>.

Variant3

This class is a "specialization" of Variant for a fixed number (3) of types. Its 3 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, A3>.

Variant4

This class is a "specialization" of Variant for a fixed number (4) of types. Its 4 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A4>.

Variant5

This class is a "specialization" of Variant for a fixed number (5) of types. Its 5 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A5>.

Variant6

This class is a "specialization" of Variant for a fixed number (6) of types. Its 6 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A6>.

Variant7

This class is a "specialization" of Variant for a fixed number (7) of types. Its 7 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A7>.

Variant8

This class is a "specialization" of Variant for a fixed number (8) of types. Its 8 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A8>.

Variant9

This class is a "specialization" of Variant for a fixed number (9) of types. Its 9 template arguments must all be specified (none are defaulted to bslmf::Nil). It provides the same functionality as Variant<A1, A2, ..., A9>.

VariantImp

This class provides the implementation of Variant (except for the creators) given a list of template parameter TYPES.

VariantImp_AllocatorBase

This class is component‐private. Do not use. This class contains the typedef`s and data members of the `Variant class, and serves as the base class for the variant when any one of the types held by the variant has the bslma::UsesBslmaAllocator type trait.

VariantImp_NoAllocatorBase

This class is component‐private. Do not use. This class contains the typedef`s and data members of the `Variant class, and serves as the base class for the variant when none of the types held by the variant has the bslma::UsesBslmaAllocator type trait. The goal is to optimize the size of the variant to avoid holding an unnecessary allocator pointer.

VariantImp_Traits

This struct is component‐private. Do not use. This meta‐function selects VariantImp_AllocatorBase as a base class type if any one of the types held by a variant has the bslma::UsesBslmaAllocator trait, and VariantImp_NoAllocatorBase otherwise.

VariantPrinter

Utility for printing bsl::variant to standard output streams. This class has operator<< defined for it, so it can be used, for example, in ball logs.

VariantPrinterUtil

This utility struct provides a namespace for a function that creates a bdlb::VariantPrinter with its template argument deduced from a given instance of bsl::variant.

VariantPrinter_Visitor

Visitor for visiting t_TYPE held by a variant and printing it.

Variant_BdexStreamInVisitor

This visitor, when invoked as a non‐modifiable function object on an initialized instance of some parameterized TYPE, will stream in a value of the same TYPE into that instance from a stream specified at construction of this visitor, using a version also specified at construction of this visitor.

Variant_BdexStreamOutVisitor

This visitor, when invoked as a non‐modifiable function object on an initialized instance of some parameterized TYPE, will stream out the value of that instance into a stream specified at construction of this visitor, using a version also specified at construction of this visitor.

Variant_CopyAssignVisitor

This visitor, when invoked as a non‐modifiable function object on an instance of some template parameter TYPE, will copy‐assign that instance to the instance of the same TYPE held in a buffer specified at construction of this visitor.

Variant_CopyConstructVisitor

This visitor, when invoked as a non‐modifiable function object on an instance of some template parameter TYPE, will copy‐insert that instance to create an instance of the same TYPE in an uninitialized buffer specified at construction of this visitor.

Variant_DefaultConstructVisitor

This visitor, when invoked as a non‐modifiable function object on an instance of some template parameter TYPE, will create a default instance of TYPE.

Variant_DestructorVisitor

This visitor, when invoked as a function object on an instance of some template parameter TYPE, will destroy that instance.

Variant_EqualityTestVisitor

This visitor, when invoked as a non‐modifiable function object on an instance of some template parameter TYPE, tests the equality of the value of that instance and of another instance held in a buffer specified at construction of this visitor, and stores the result into its publicly accessible d_result member.

Variant_MoveAssignVisitor

This visitor, when invoked as a non‐modifiable function object on an instance of some template parameter TYPE, will move‐assign that instance to the instance of the same TYPE held in a buffer specified at construction of this visitor.

Variant_MoveConstructVisitor

This visitor, when invoked as a non‐modifiable function object on an instance of some template parameter TYPE, will move‐insert that instance to create an instance of the same TYPE in an uninitialized buffer specified at construction of this visitor.

Variant_PrintVisitor

This visitor, when invoked as a non‐modifiable function object on an instance of some template parameter TYPE, writes the value of that instance to a stream specified at construction of this visitor, using spacing information also specified at construction.

Variant_RawVisitorHelper

This struct provides a helper for implementing Variant::applyRaw that enables applyRaw to support visitor functors that do not provide an overload for operator()(bslmf::Nil). Objects of this type are constructed using a functor of (template parameter) type VISITOR, whose operator() returns the (template parameter) type RESULT_TYPE. A Variant_RawVisitorHelper wraps a functor of type VISITOR and provides an implementation of operator()(bslmf::Nil) that performs a BSLS_ASSERT_OPT(false). Note that this overload is needed to enable compilation (specifically, to instantiate doApply and doApplyR), but is never invoked by any code path at runtime.

Variant_ReturnValueHelper

This struct is a component‐private meta‐function. Do not use. This meta‐function checks whether the template parameter type VISITOR has the member ResultType defined using "SFINAE" (Substitution Failure Is Not An Error). A value of true indicates VISITOR::ResultType exists, and false otherwise.

Variant_ReturnValueHelper_Matcher

This struct is a component‐private struct. Do not use. This provides functions, the matching of which are used by Variant_ReturnValueHelper to determine whether the template parameter type VISITOR has the member ResultType defined.

Variant_ReturnValueHelper_NoType

Component‐private struct used by SFINAE detection when ResultType is absent.

Variant_SwapVisitor

This visitor swaps the variant object data that it holds with another variant object data of parameterize TYPE. It requires that the two variant objects being swapped contain data of the same type, and use the same allocator.

Variant_TypeIndex

Component‐private meta‐function. Do not use. This meta‐function computes the index of the template parameter TYPE in the template parameter list of TYPES.

Type Aliases

Name

Description

NullOptType

This class provides an empty tag type so that bdlb::NullableValue can be explicitly constructed in or assigned to an empty state. There are no publicly accessible constructors for this type other than the copy constructor. In particular, it is not default constructible, nor list‐initializable in C++11.

ScopeExitAny

ScopeExitAny is an alias to ScopeExit<bsl::function<void()> >, effectively making it a polymorphic scope exit type.

TestInputIterator

Alias for bsltf::InputIterator<TYPE>; a pure input iterator for an empty range, used to test algorithm compatibility with restrictive input iterators.

Variant_ReturnValueHelper_YesType

Component‐private type used by SFINAE detection when ResultType exists.

Functions

Name

Description

hashAppend

hashAppend overloads

nullableValue_acceptsBslOptional

Component‐private constraint helper for bsl::optional conversion.

nullableValue_acceptsStdOptional

Component‐private constraint helper for std::optional conversion.

operator+

Return a copy of the specified iterator object with its underlying iterator advanced by the specified (signed) offset from that of iterator. The behavior is undefined if so advancing the underlying iterator is undefined.

operator++

Increment operators

operator‐

Subtraction operators

operator‐‐

Decrement the underlying iterator of the specified iterator, and return a copy of iterator before the decrement. The behavior is undefined if decrementing the underlying iterator is undefined.

operator|

Translate the range of bsl::pair`s into a range of `std::pair`s, where each `pair of the resulting range is a pair of references to the corresponding members of the corresponding pair in the input range.

swap

swap overloads

operator<<

Stream insertion 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

nullOpt

bsl::nullopt value imported into the bdlb namespace.

Concepts

Name

Description

NullableValue_ConvertibleToBool

This component‐private concept models the Standard's exposition‐only boolean‐testable concept.

NullableValue_DerivedFromBslOptional

This component‐private concept is used in the subsequent implementation of the component‐private concept NullableValue_DerivedFromOptional.

NullableValue_DerivedFromOptional

This component‐private concept models whether a type is derived from one of std::optional, or bsl::optional. Note that this concept is always satisfied for bdlb::NullableValue as it is derived from bsl::optional.

NullableValue_DerivedFromStdOptional

This component‐private concept is used in the subsequent implementation of the component‐private concept NullableValue_DerivedFromOptional.

Created with MrDocs