[#BloombergLP-bdlb] = xref:BloombergLP.adoc[BloombergLP]::bdlb :relfileprefix: ../ :mrdocs: Namespace for bit‐level utility functions. == Namespaces [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/PrintMethods.adoc[`PrintMethods`] | This `namespace` contains parameterized `print` methods having the standard BDE signature for such methods. |=== == Types [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/AlgorithmWorkaroundUtil.adoc[`AlgorithmWorkaroundUtil`] | A namespace for replacement workarounds for some platform supplied faulty algorithms (particularly for the Sun Studio compiler). | xref:BloombergLP/bdlb/ArrayUtil.adoc[`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 | xref:BloombergLP/bdlb/BigEndianInt16.adoc[`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. | xref:BloombergLP/bdlb/BigEndianInt32.adoc[`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. | xref:BloombergLP/bdlb/BigEndianInt64.adoc[`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. | xref:BloombergLP/bdlb/BigEndianUint16.adoc[`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. | xref:BloombergLP/bdlb/BigEndianUint32.adoc[`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. | xref:BloombergLP/bdlb/BigEndianUint64.adoc[`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. | xref:BloombergLP/bdlb/BitMaskUtil.adoc[`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. | xref:BloombergLP/bdlb/BitStringImpUtil.adoc[`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. | xref:BloombergLP/bdlb/BitStringUtil.adoc[`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}). | xref:BloombergLP/bdlb/BitUtil.adoc[`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. | xref:BloombergLP/bdlb/CStringEqualTo.adoc[`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. | xref:BloombergLP/bdlb/CStringHash.adoc[`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. | xref:BloombergLP/bdlb/CStringLess.adoc[`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. | xref:BloombergLP/bdlb/CaselessStringViewEqualTo.adoc[`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. | xref:BloombergLP/bdlb/CaselessStringViewHash.adoc[`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. | xref:BloombergLP/bdlb/CaselessStringViewLess.adoc[`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. | xref:BloombergLP/bdlb/CharType.adoc[`CharType`] | This `struct` provides a namespace for a suite of pure procedures operating on the fundamental type `char`. | xref:BloombergLP/bdlb/ConstNullableValueRef.adoc[`ConstNullableValueRef`] | This class is a wrapper for either a `bsl::optional` or `NullableAllocatedValue`, and provides non‐modifiable access to the wrapped object. | xref:BloombergLP/bdlb/DoubleCompareUtil.adoc[`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. | xref:BloombergLP/bdlb/Float.adoc[`Float`] | Namespace for floating‐point classification types and functions. | xref:BloombergLP/bdlb/FunctionOutputIterator.adoc[`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. | xref:BloombergLP/bdlb/Guid.adoc[`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. | xref:BloombergLP/bdlb/GuidUtil.adoc[`GuidUtil`] | This `struct` provides a namespace for functions that create Universally Unique Identifiers per RFC 4122 (http://www.ietf.org/rfc/rfc4122.txt). | xref:BloombergLP/bdlb/Guid_BslFmtFormatterImpl.adoc[`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`. | xref:BloombergLP/bdlb/HasPrintMethod-03cc8.adoc[`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; ` | xref:BloombergLP/bdlb/HashUtil.adoc[`HashUtil`] | This `struct` provides a namespace for hash functions. | xref:BloombergLP/bdlb/IndexSpan.adoc[`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. | xref:BloombergLP/bdlb/IndexSpanStringUtil.adoc[`IndexSpanStringUtil`] | This struct serves as a namespace for utility functions that operate on `IndexSpan` and string objects. | xref:BloombergLP/bdlb/IndexSpanUtil.adoc[`IndexSpanUtil`] | This struct serves as a namespace for utility functions that operate on `IndexSpan` objects. | xref:BloombergLP/bdlb/LiteralUtil.adoc[`LiteralUtil`] | This `struct` provides a namespace for utility routines that operate on (programming language) literals. | xref:BloombergLP/bdlb/NullOutputIterator.adoc[`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. | xref:BloombergLP/bdlb/NullOutputIteratorAssignmentProxy.adoc[`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. | xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[`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&`. | xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair.adoc[`NullableAllocatedValue_PointerBitsPair`] | This is a component‐private class. Do not use. | xref:BloombergLP/bdlb/NullableValue.adoc[`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`. | xref:BloombergLP/bdlb/NullableValueRef.adoc[`NullableValueRef`] | This class is a wrapper for either a `bsl::optional` or `NullableAllocatedValue`, and provides modifiable access to the wrapped object. | xref:BloombergLP/bdlb/NullableValue_WithAllocator.adoc[`NullableValue_WithAllocator`] | Component‐private base for allocator‐aware `NullableValue` specializations. | xref:BloombergLP/bdlb/NullableValue_WithoutAllocator.adoc[`NullableValue_WithoutAllocator`] | Component‐private base for non‐allocator‐aware `NullableValue` specializations. | xref:BloombergLP/bdlb/NumericParseUtil.adoc[`NumericParseUtil`] | This `struct` provides a namespace for a suite of stateless procedures that perform parsing functionality for numbers. | xref:BloombergLP/bdlb/OptionalPrinter.adoc[`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. | xref:BloombergLP/bdlb/OptionalPrinterUtil.adoc[`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`. | xref:BloombergLP/bdlb/PairUtil.adoc[`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. | xref:BloombergLP/bdlb/PcgRandomGenerator.adoc[`PcgRandomGenerator`] | This class implements a random number generator (RNG) based on the PCG algorithm. | xref:BloombergLP/bdlb/Print.adoc[`Print`] | Provide a namespace for the interface to a suite of procedural stream operations. | xref:BloombergLP/bdlb/PrintAdapter.adoc[`PrintAdapter`] | This `class` provides an object that may be streamed with `operator<<` to give full control of the indentation format of the streaming. | xref:BloombergLP/bdlb/PrintAdapterUtil.adoc[`PrintAdapterUtil`] | Utility for constructing a `PrintAdapter` without naming its template argument (useful in C++03; CTAD can replace this in C++17+). | xref:BloombergLP/bdlb/PrintMethods_Imp-0c.adoc[`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. | xref:BloombergLP/bdlb/PrintMethods_Imp-08.adoc[`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. | xref:BloombergLP/bdlb/PrintMethods_Imp-05.adoc[`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. | xref:BloombergLP/bdlb/PrintMethods_Imp-09.adoc[`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. | xref:BloombergLP/bdlb/PrintStringHexDumper.adoc[`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); | xref:BloombergLP/bdlb/PrintStringSingleLineHexDumper.adoc[`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; | xref:BloombergLP/bdlb/Random.adoc[`Random`] | This `struct` provides a namespace for a suite of functions used for random‐number generation. | xref:BloombergLP/bdlb/RandomDevice.adoc[`RandomDevice`] | This `struct` provides a namespace for a suite of functions used for acquiring random numbers from the system. | xref:BloombergLP/bdlb/ScopeExit-0e.adoc[`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). | xref:BloombergLP/bdlb/ScopeExitUtil.adoc[`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. | xref:BloombergLP/bdlb/String.adoc[`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. | xref:BloombergLP/bdlb/StringRefUtil.adoc[`StringRefUtil`] | This `struct` provides a namespace for a suite of functions on `bslstl::StringRef` references to strings. | xref:BloombergLP/bdlb/StringViewUtil.adoc[`StringViewUtil`] | This `struct` provides a namespace for a suite of functions on `bsl::string_view` containers. | xref:BloombergLP/bdlb/Tokenizer.adoc[`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`. | xref:BloombergLP/bdlb/TokenizerIterator.adoc[`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. | xref:BloombergLP/bdlb/Tokenizer_Data.adoc[`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 ` | xref:BloombergLP/bdlb/Tokenizer_Proxy.adoc[`Tokenizer_Proxy`] | This class provides a proxy holder of a reference to a `TokernizerIterator` object, allowing correct return of `operator‐>`. | xref:BloombergLP/bdlb/TopologicalSortUtil.adoc[`TopologicalSortUtil`] | This `struct` `TopologicalSortUtil` provides a namespace for topological sorting functions. | xref:BloombergLP/bdlb/TopologicalSortUtilEdgeTraits-0c.adoc[`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; | xref:BloombergLP/bdlb/TopologicalSortUtil_Helper.adoc[`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. | xref:BloombergLP/bdlb/TransformIterator.adoc[`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. | xref:BloombergLP/bdlb/TransformIteratorUtil.adoc[`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. | xref:BloombergLP/bdlb/TransformIterator_AllocatorOfFunctorMethod-01.adoc[`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`. | xref:BloombergLP/bdlb/TransformIterator_AllocatorOfIteratorMethod-00.adoc[`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`. | xref:BloombergLP/bdlb/TransformIterator_Traits-0f.adoc[`TransformIterator_Traits`] | This component‐private class defines various types that are used in the implementation of the transform iterator. | xref:BloombergLP/bdlb/TransparentEqualTo.adoc[`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. | xref:BloombergLP/bdlb/TransparentHash.adoc[`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. | xref:BloombergLP/bdlb/TransparentLess.adoc[`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. | xref:BloombergLP/bdlb/TransparentStringHash.adoc[`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. | xref:BloombergLP/bdlb/TypeTraitHasPrintMethod.adoc[`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; ` | xref:BloombergLP/bdlb/Variant.adoc[`Variant`] | | xref:BloombergLP/bdlb/Variant10.adoc[`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>`. | xref:BloombergLP/bdlb/Variant11.adoc[`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>`. | xref:BloombergLP/bdlb/Variant12.adoc[`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>`. | xref:BloombergLP/bdlb/Variant13.adoc[`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>`. | xref:BloombergLP/bdlb/Variant14.adoc[`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>`. | xref:BloombergLP/bdlb/Variant15.adoc[`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>`. | xref:BloombergLP/bdlb/Variant16.adoc[`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>`. | xref:BloombergLP/bdlb/Variant17.adoc[`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>`. | xref:BloombergLP/bdlb/Variant18.adoc[`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>`. | xref:BloombergLP/bdlb/Variant19.adoc[`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>`. | xref:BloombergLP/bdlb/Variant2.adoc[`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>`. | xref:BloombergLP/bdlb/Variant3.adoc[`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>`. | xref:BloombergLP/bdlb/Variant4.adoc[`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>`. | xref:BloombergLP/bdlb/Variant5.adoc[`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>`. | xref:BloombergLP/bdlb/Variant6.adoc[`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>`. | xref:BloombergLP/bdlb/Variant7.adoc[`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>`. | xref:BloombergLP/bdlb/Variant8.adoc[`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>`. | xref:BloombergLP/bdlb/Variant9.adoc[`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>`. | xref:BloombergLP/bdlb/VariantImp.adoc[`VariantImp`] | This class provides the implementation of `Variant` (except for the creators) given a list of template parameter `TYPES`. | xref:BloombergLP/bdlb/VariantImp_AllocatorBase.adoc[`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. | xref:BloombergLP/bdlb/VariantImp_NoAllocatorBase.adoc[`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. | xref:BloombergLP/bdlb/VariantImp_Traits.adoc[`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. | xref:BloombergLP/bdlb/VariantPrinter.adoc[`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. | xref:BloombergLP/bdlb/VariantPrinterUtil.adoc[`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`. | xref:BloombergLP/bdlb/VariantPrinter_Visitor.adoc[`VariantPrinter_Visitor`] | Visitor for visiting `t_TYPE` held by a variant and printing it. | xref:BloombergLP/bdlb/Variant_BdexStreamInVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_BdexStreamOutVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_CopyAssignVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_CopyConstructVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_DefaultConstructVisitor.adoc[`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`. | xref:BloombergLP/bdlb/Variant_DestructorVisitor.adoc[`Variant_DestructorVisitor`] | This visitor, when invoked as a function object on an instance of some template parameter `TYPE`, will destroy that instance. | xref:BloombergLP/bdlb/Variant_EqualityTestVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_MoveAssignVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_MoveConstructVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_PrintVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_RawVisitorHelper.adoc[`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. | xref:BloombergLP/bdlb/Variant_ReturnValueHelper.adoc[`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. | xref:BloombergLP/bdlb/Variant_ReturnValueHelper_Matcher.adoc[`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. | xref:BloombergLP/bdlb/Variant_ReturnValueHelper_NoType.adoc[`Variant_ReturnValueHelper_NoType`] | Component‐private struct used by SFINAE detection when `ResultType` is absent. | xref:BloombergLP/bdlb/Variant_SwapVisitor.adoc[`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. | xref:BloombergLP/bdlb/Variant_TypeIndex.adoc[`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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/NullOptType.adoc[`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. | xref:BloombergLP/bdlb/ScopeExitAny.adoc[`ScopeExitAny`] | `ScopeExitAny` is an alias to `ScopeExit<bsl::function<void()> >`, effectively making it a polymorphic scope exit type. | xref:BloombergLP/bdlb/TestInputIterator.adoc[`TestInputIterator`] | Alias for `bsltf::InputIterator<TYPE>`; a pure input iterator for an empty range, used to test algorithm compatibility with restrictive input iterators. | xref:BloombergLP/bdlb/Variant_ReturnValueHelper_YesType.adoc[`Variant_ReturnValueHelper_YesType`] | Component‐private type used by SFINAE detection when `ResultType` exists. |=== == Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/hashAppend-05.adoc[`hashAppend`] | `hashAppend` overloads | xref:BloombergLP/bdlb/nullableValue_acceptsBslOptional.adoc[`nullableValue_acceptsBslOptional`] | Component‐private constraint helper for `bsl::optional` conversion. | xref:BloombergLP/bdlb/nullableValue_acceptsStdOptional.adoc[`nullableValue_acceptsStdOptional`] | Component‐private constraint helper for `std::optional` conversion. | xref:BloombergLP/bdlb/operator_plus-02.adoc[`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. | xref:BloombergLP/bdlb/operator_inc-055.adoc[`operator++`] | Increment operators | xref:BloombergLP/bdlb/operator_minus-07.adoc[`operator‐`] | Subtraction operators | xref:BloombergLP/bdlb/operator_dec.adoc[`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. | xref:BloombergLP/bdlb/operator_bitor.adoc[`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. | xref:BloombergLP/bdlb/swap-09.adoc[`swap`] | `swap` overloads | xref:BloombergLP/bdlb/operator_lshift-011.adoc[`operator<<`] | Stream insertion operators | xref:BloombergLP/bdlb/operator_eq-064.adoc[`operator==`] | Equality operators | xref:BloombergLP/bdlb/operator_not_eq-067.adoc[`operator!=`] | Inequality operators | xref:BloombergLP/bdlb/operator_lt-046.adoc[`operator<`] | Less‐than operators | xref:BloombergLP/bdlb/operator_le-0e.adoc[`operator<=`] | Less‐than‐or‐equal operators | xref:BloombergLP/bdlb/operator_gt-0dc.adoc[`operator>`] | Greater‐than operators | xref:BloombergLP/bdlb/operator_ge-064.adoc[`operator>=`] | Greater‐than‐or‐equal operators | xref:BloombergLP/bdlb/operator_3way-0f.adoc[`operator<=>`] | Three‐way comparison operators |=== == Variables [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/nullOpt.adoc[`nullOpt`] | `bsl::nullopt` value imported into the `bdlb` namespace. |=== == Concepts [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/NullableValue_ConvertibleToBool.adoc[`NullableValue_ConvertibleToBool`] | This component‐private concept models the Standard's exposition‐only `boolean‐testable` concept. | xref:BloombergLP/bdlb/NullableValue_DerivedFromBslOptional.adoc[`NullableValue_DerivedFromBslOptional`] | This component‐private concept is used in the subsequent implementation of the component‐private concept `NullableValue_DerivedFromOptional`. | xref:BloombergLP/bdlb/NullableValue_DerivedFromOptional.adoc[`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`. | xref:BloombergLP/bdlb/NullableValue_DerivedFromStdOptional.adoc[`NullableValue_DerivedFromStdOptional`] | This component‐private concept is used in the subsequent implementation of the component‐private concept `NullableValue_DerivedFromOptional`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#