[#BloombergLP-bsltf]
= xref:BloombergLP.adoc[BloombergLP]::bsltf
:relfileprefix: ../
:mrdocs:

Package namespace for BSL template&hyphen;testing facility types and helpers&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsltf/AllocArgumentType.adoc[`AllocArgumentType`] 
| This class template declares a separate type for each template parameter value `N`, `bsltf&colon;&colon;AllocArgumentType&lt;N&gt;`, that wraps an integer value and provides implicit conversion to and from `int`&period; The wrapped integer will be dynamically allocated using the supplied allocator, or the default allocator if none is supplied&period; Its main purpose is that having separate types for testing enables distinguishing them when calling through a function template interface, thereby avoiding ambiguities or accidental switching of arguments in the implementation of in&hyphen;place constructors&period; It further tests that allocators are propagated correctly, or not, as required&period;
| xref:BloombergLP/bsltf/AllocBitwiseMoveableTestType.adoc[`AllocBitwiseMoveableTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class that is bitwise&hyphen;moveable, uses a `bslma&colon;&colon;Allocator` to supply memory, and defines the type traits `bslma&colon;&colon;UsesBslmaAllocator` and `bslmf&colon;&colon;IsBitwiseMoveable`&period; See the  section for information on the class attributes&period;
| xref:BloombergLP/bsltf/AllocEmplacableTestType.adoc[`AllocEmplacableTestType`] 
| This class provides a test object used to check that the arguments passed for creating an object with an in&hyphen;place representation are of the correct types and values&period;
| xref:BloombergLP/bsltf/AllocTestType.adoc[`AllocTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class that uses a `bsl&colon;&colon;allocator&lt;&gt;` to supply memory and defines the type trait `bslma&colon;&colon;UsesBslmaAllocator`&period; This class is primarily provided to facilitate testing of templates by defining a simple type representative of user&hyphen;defined types having an allocator&period; See the Attributes section under DESCRIPTION in the component&hyphen;level documentation for information on the class attributes&period;
| xref:BloombergLP/bsltf/ArgumentType.adoc[`ArgumentType`] 
| This class template wraps an integer value and provides implicit conversion to, and explicit conversion from, `int`, while keeping track of copy and move operations&period; Its main purpose is for following an argument through a forwarding interface in test drivers&period; Each value of the template parameter `N` yields a unique type, enabling a test driver to distingusih them when calling through a function template interface, thereby avoiding ambiguities or accidental switching of arguments in the implementation of test&hyphen;class methods and constructors or in calls to methods and constructors of a class template under test&period; When an object of this type is copied or moved (via construction or assignment), the value returned by the `copyMoveState` accessor (the _copy&sol;move_ _state_), is updated for the target object and, in the case of a move, for the source object as well&period;
| xref:BloombergLP/bsltf/ArgumentTypeByValue.adoc[`ArgumentTypeByValue`] 
| This class works around a limitation in C&plus;&plus;03 whereby initializing a pass&hyphen;by&hyphen;value parameter of type `bslmf&colon;&colon;ArgumentType&lt;N&gt;` from a `MovableRef&lt;bslmf&colon;&colon;ArgumentType&lt;N&gt; &gt;` results in an ambiguous conversion sequence (i&period;e&period;, `MovableRef&colon;&colon;operator T&amp;` vs&period; `ArgumentType(MovableRef)` are equally good conversions)&period; Pass&hyphen;by&hyphen;value use cases (e&period;g&period;, recording the value category of multiple function arguments) can use this class as a parameter type, instead, eliminating the ambiguity because `MovableRef&lt;AT&gt;` &hyphen;&gt; `AT&amp;` &hyphen;&gt; `ArgumentTypeByValue` requires _two_ user&hyphen;defined conversions and is therefore eliminated during overload resolution&period;
| xref:BloombergLP/bsltf/ArgumentTypeDefault.adoc[`ArgumentTypeDefault`] 
| Empty class used as a default argument initializer for `ArgumentType`&period; Example usage&colon; &grave; void func(ArgumentTypeByValue&lt;1&gt; arg1 &equals; ArgumentTypeDefault(), ArgumentTypeByValue&lt;2&gt; arg2 &equals; ArgumentTypeDefault())&semi; &grave;
| xref:BloombergLP/bsltf/BitwiseCopyableTestType.adoc[`BitwiseCopyableTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class defines the `bsl&colon;&colon;is&lowbar;trivially&lowbar;copyable` trait and does not allocate memory&period; See the  section for information on the class attributes&period;
| xref:BloombergLP/bsltf/BitwiseMoveableTestType.adoc[`BitwiseMoveableTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class defines the `bslmf&colon;&colon;IsBitwiseMoveable` and does not allocate memory&period; See the  section for information on the class attributes&period;
| xref:BloombergLP/bsltf/ConvertibleValueWrapper.adoc[`ConvertibleValueWrapper`] 
| This class provides a wrapper around an object of the specified (template parameter) `TYPE`&period; `TYPE` shall be CopyConstructible&period; If `TYPE` is a value&hyphen;semantic type, then this class will also be value semantic&period; Objects of this type are implicitly convertible to and from objects of the specified `TYPE`&period;
| xref:BloombergLP/bsltf/CopyMoveState-0e.adoc[`CopyMoveState`] 
| Namespace for enumerators and helpers describing copy&sol;move history of test objects&period;
| xref:BloombergLP/bsltf/CopyMoveTracker.adoc[`CopyMoveTracker`] 
| Type that tracks whether it has been copied into, moved into, or moved from&period;
| xref:BloombergLP/bsltf/DegenerateFunctor.adoc[`DegenerateFunctor`] 
| This test class template adapts a CopyConstructible class to offer a minimal or outright obstructive interface for testing generic code&period; To support the testing of standard containers, this adapter will be MoveConstructible, CopyConstructible, and nothrow Destructible as long as the adapted `FUNCTOR` satisfies the same requirements&period; This class will further be Swappable if (the template parameter) `ENABLE&lowbar;SWAP` is `true` and the adapted `FUNCTOR` is MoveConstructible&period; The (inherited) function call operator should be the only other available method, no other operation (e&period;g&period;, the unary address&hyphen;of operator) should be usable&period; We take advantage of the fact that defining a copy constructor inhibits the generation of a default constructor, and that constructors are not inherited by a derived class&period; `DegenerateFunctor` objects must be created through either the copy constructor, or by wrapping a `FUNCTOR` object through the static factory method of this class, `cloneBaseObject`&period;
| xref:BloombergLP/bsltf/EmplacableTestType.adoc[`EmplacableTestType`] 
| This class provides a test object used to check that the arguments passed for creating an object with an in&hyphen;place representation are of the correct type and value&period;
| xref:BloombergLP/bsltf/EnumeratedTestType.adoc[`EnumeratedTestType`] 
| This `struct` provides a namespace for defining an `enum` type that supports explicit conversion to and from an integral type for values from 0 to 127 (according to 7&period;2&period;7 of the C&plus;&plus;11 standard)&period;
| xref:BloombergLP/bsltf/EvilBooleanType.adoc[`EvilBooleanType`] 
| This class provides a test type for predicates returning a type that is convertible&hyphen;to&hyphen;bool&period; It makes life reasonably difficult by disabling the address&hyphen;of and comma operators, but deliberately does not overload the `&amp;&amp;` and `&verbar;&verbar;` operators, as we hope the standard will be updated to no longer require such support&period; Once C&plus;&plus;11 becomes available, this class would use an `explicit operator bool()` conversion operator, and explicitly supply the `&equals;&equals;` and `!&equals;` operators, but we use the convertible&hyphen;to&hyphen;pointer&hyphen;to&hyphen;member idiom in the meantime&period; Implicitly defined operations fill out the API as needed&period;
| xref:BloombergLP/bsltf/InputIterator.adoc[`InputIterator`] 
| 
| xref:BloombergLP/bsltf/InputIteratorUtil.adoc[`InputIteratorUtil`] 
| This namespace `struct` allows the easy creation of `begin` and `end` iterators from a variety of contiguous range types&period; Either the argument must be an array, or a container that supports the following operations&colon; &ast; `size()` &ast; `operator` (if 0 !&equals; size())
| xref:BloombergLP/bsltf/MovableAllocTestType.adoc[`MovableAllocTestType`] 
| This class provides an unconstrained (value&hyphen;semantic) attribute type that records when move semantics have been invoked with the object instance as the source parameter&period; The class uses a `bslma&colon;&colon;Allocator` to allocate memory and defines the type trait `bslma&colon;&colon;UsesBslmaAllocator`&period; This class is primarily provided to facilitate testing of templates where move semantics need to be differentiated versus copy semantics&period; See the `Attributes` section under DESCRIPTION in the component&hyphen;level documentation for information on the class attributes&period;
| xref:BloombergLP/bsltf/MovableTestType.adoc[`MovableTestType`] 
| This class provides an unconstrained (value&hyphen;semantic) attribute type that records when move semantics have been invoked with the object instance as the source parameter&period; This class is primarily provided to facilitate testing of templates where move semantics need to be differentiated versus copy semantics&period; See the `Attributes` section under DESCRIPTION in the component&hyphen;level documentation for information on the class attributes&period;
| xref:BloombergLP/bsltf/MoveOnlyAllocTestType.adoc[`MoveOnlyAllocTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class that uses a `bslma&colon;&colon;Allocator` to supply memory and defines the type trait `bslma&colon;&colon;UsesBslmaAllocator`&period; This class is primarily provided to facilitate testing of templates by defining a simple type representative of user&hyphen;defined types having an allocator&period; See the Attributes section under DESCRIPTION in the component&hyphen;level documentation for information on the class attributes&period;
| xref:BloombergLP/bsltf/MoveState.adoc[`MoveState`] 
| Namespace for enumerators describing whether a test object was moved&period;
| xref:BloombergLP/bsltf/NonAssignableTestType.adoc[`NonAssignableTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class does not provide an assignment operator&period;
| xref:BloombergLP/bsltf/NonCopyConstructibleTestType.adoc[`NonCopyConstructibleTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class does not provide a copy constructor&period;
| xref:BloombergLP/bsltf/NonDefaultConstructibleTestType.adoc[`NonDefaultConstructibleTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class does not provide a default constructor&period;
| xref:BloombergLP/bsltf/NonEqualComparableTestType.adoc[`NonEqualComparableTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class does not provide equality&hyphen;comparison operators&period;
| xref:BloombergLP/bsltf/NonOptionalAllocTestType.adoc[`NonOptionalAllocTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class that uses a `bslma&colon;&colon;Allocator` to allocate memory and defines the type trait `bslma&colon;&colon;UsesBslmaAllocator`&period; This class does not provide a default constructor&period;
| xref:BloombergLP/bsltf/NonTypicalOverloadsTestType.adoc[`NonTypicalOverloadsTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class ensures that the operator new member and operator delete member never gets called by overloading and asserting in them&period; See the Attributes section under DESCRIPTION in the component&hyphen;level documentation for information on the class attributes&period;
| xref:BloombergLP/bsltf/SimpleTestType.adoc[`SimpleTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class does not allocate memory and does not define any traits&period; See the  section for information on the class attributes&period;
| xref:BloombergLP/bsltf/StdAllocTestType.adoc[`StdAllocTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class uses a standard allocator of (template parameter) type `ALLOC` to allocate memory&period; This class does NOT define the type trait `bslma&colon;&colon;UsesBslmaAllocator`, but the trait will be `true` if `ALLOC` is convertible from `bslma&colon;&colon;Allocator &ast;` (e&period;g&period;, if it is an instantiation of `bsl&colon;&colon;allocator`)&period; This class is primarily provided to facilitate testing of templates by defining a simple type representative of user&hyphen;defined types using a standard allocator&period; See the  section for information on the class attributes&period;
| xref:BloombergLP/bsltf/StdAllocatorAdaptor.adoc[`StdAllocatorAdaptor`] 
| This class template provides the facade of an allocator but mostly delegates operations to the allocator object (of template parameter type) it adapts, except that it enables the propagation of the (stateful) allocator object to constructed elements, if appropriate&period;
| xref:BloombergLP/bsltf/StdStatefulAllocator.adoc[`StdStatefulAllocator`] 
| This allocator implements the minimal interface to comply with section 17&period;6&period;3&period;5 (&lsqb;allocator&period;requirements&rsqb;) of the C&plus;&plus;11 standard, while maintaining a distinct object state &hyphen; in this case a wrapped pointer to a `bslma&colon;&colon;Allocator`&period; The template is configurable to control its allocator propagation properties, but does not support the BDE &quot;scoped&quot; allocator model, as scoped allocators should never propagate&period; Instances of this allocator delegate their operations to the wrapped allocator that constitutes its state&period; Note that while we define the various traits used by the C&plus;&plus;11 allocator traits facility, they actually mean very little for this component, as it is the consumer of the allocator&apos;s responsibility to check and apply the traits correctly, typically by using `bsl&colon;&colon;allocator&lowbar;traits` to perform all memory allocation tasks rather than using the allocator directly&period; The `PROPAGATE&lowbar;ON&lowbar;CONTAINER&lowbar;COPY&lowbar;CONSTRUCTION` flag is consumed directly though, in the static member function `select&lowbar;on&lowbar;container&lowbar;copy&lowbar;construction`&period;
| xref:BloombergLP/bsltf/StdTestAllocator-05.adoc[`StdTestAllocator`] 
| This allocator implements the minimal interface to comply with section 20&period;1&period;5 (&lsqb;lib&period;allocator&period;requirements&rsqb;) of the C&plus;&plus;03 standard&period; Instances of this allocator delegate their operations to a globally configured delegate allocator as C&plus;&plus;03 compliant allocators cannot have individually identifiable state (see `StdTestAllocatorConfiguration` and &apos;StdTestAllocatorConfigurationGuard)&period;
| xref:BloombergLP/bsltf/StdTestAllocatorConfiguration.adoc[`StdTestAllocatorConfiguration`] 
| This `struct` provides a namespace for functions that manipulate and access the _delegate allocator_ for `StdTestAllocator`&period; The delegate allocator is the allocator to which `StdTestAllocator` objects delegate their operations&period; The provided operations are _not_ thread&hyphen;safe&period; Note that this allocator is configured globally as C&plus;&plus;03 standard compliant allocators cannot have individually identifiable state&period;
| xref:BloombergLP/bsltf/StdTestAllocatorConfigurationGuard.adoc[`StdTestAllocatorConfigurationGuard`] 
| Upon construction, an object of this class saves the current &ast;delegate allocator&ast; for `StdTestAllocator` and and installs the user&hyphen;specified allocator as the delegate allocator&period; The delegate allocator is the globally configured allocator to which an `StdTestAllocator` objects delegate their operations&period; On destruction, the original delegate allocator is restored&period;
| xref:BloombergLP/bsltf/StdTestAllocator_CommonUtil.adoc[`StdTestAllocator&lowbar;CommonUtil`] 
| This `struct` provides a namespace for utilities that are common to all instantiations of the `StdTestAllocator` class template&period;
| xref:BloombergLP/bsltf/TemplateTestFacility.adoc[`TemplateTestFacility`] 
| This `struct` provides a namespace that contains three aliases for types intended to be used as template parameters for testing templates&period; The namespace also contain two class method templates, `create` and `getIdentifier`, that respectively provides a consistent interface to (1) create a specified object of a parameterized type from an integer identifier and (2) get the identifier value of a specified object&period; The identifier value returned from the `getIdentifier` method is undefined unless the specified object was originally created with the `create` class method template&period;
| xref:BloombergLP/bsltf/TemplateTestFacility_CompareHelper.adoc[`TemplateTestFacility&lowbar;CompareHelper`] 
| Component&hyphen;private helper providing equality comparisons for test types&period;
| xref:BloombergLP/bsltf/TemplateTestFacility_StubClass.adoc[`TemplateTestFacility&lowbar;StubClass`] 
| This class provides a single method template, `method`, that simply returns the parameterized integer `IDENTIFIER`&period; Note that the purpose of this class is to serve as a stub class and method to be referred by `TemplateTestFacility&colon;&colon;ObjectPtr` and `TemplateTestFacility&colon;&colon;MethodPtr` respectively&period;
| xref:BloombergLP/bsltf/TestValuesArray.adoc[`TestValuesArray`] 
| This class provides a container to store values of the (template parameter) type `VALUE`, and also provides the iterators to access the values&period; The iterators are designed to conform to a standard input iterator, and report any misuse of the iterator&period;
| xref:BloombergLP/bsltf/TestValuesArrayIterator.adoc[`TestValuesArrayIterator`] 
| This class provide a STL&hyphen;conforming input iterator over values used for testing (see section &lsqb;24&period;2&period;3 input&period;iterators&rsqb;of the C&plus;&plus;11 standard&period; A `TestValuesArrayIterator` provide access to elements of parameterized type `VALUE`&period; An iterator is considered dereferenceable all of the following are satisfied&colon; 1&period; The iterator refers to a valid element (not `end`)&period; 2&period; The iterator has not been dereferenced&period; 3&period; The iterator is not a copy of another iterator of which `operator&plus;&plus;` have been invoked&period; An iterator is comparable if the iterator is not a copy of another iterator of which `operator&plus;&plus;` have been invoked&period;
| xref:BloombergLP/bsltf/TestValuesArraySentinel.adoc[`TestValuesArraySentinel`] 
| 
| xref:BloombergLP/bsltf/TestValuesArray_DefaultConverter.adoc[`TestValuesArray&lowbar;DefaultConverter`] 
| This `struct` provides a namespace for an utility function, `createInplace`, that creates an object of the (template parameter) type `VALUE` from a character identifier&period;
| xref:BloombergLP/bsltf/TestValuesArray_PostIncrementPtr.adoc[`TestValuesArray&lowbar;PostIncrementPtr`] 
| This class is a wrapper that encapsulates a reference, providing non&hyphen;modifiable access to the element of `TestValuesArray` container&period; Object of this class is returned by post increment operator of TestValuesArray&apos; container&period;
| xref:BloombergLP/bsltf/UnionTestType.adoc[`UnionTestType`] 
| This union provides a union test type to facilitate testing of templates&period;
| xref:BloombergLP/bsltf/WellBehavedMoveOnlyAllocTestType.adoc[`WellBehavedMoveOnlyAllocTestType`] 
| This unconstrained (value&hyphen;semantic) attribute class that uses a `bslma&colon;&colon;Allocator` to supply memory and defines the type trait `bslma&colon;&colon;UsesBslmaAllocator`&period; This class is primarily provided to facilitate testing of templates by defining a simple type representative of user&hyphen;defined types having an allocator&period; See the  section for information on the class attributes&period;
|===


== Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsltf/copyMoveState-0f.adoc[`copyMoveState`] 
| `copyMoveState` overloads
| xref:BloombergLP/bsltf/debugprint-04e.adoc[`debugprint`] 
| `debugprint` overloads
| xref:BloombergLP/bsltf/getMovedFrom-01.adoc[`getMovedFrom`] 
| `getMovedFrom` overloads
| xref:BloombergLP/bsltf/getMovedInto-0d.adoc[`getMovedInto`] 
| `getMovedInto` overloads
| xref:BloombergLP/bsltf/setCopyMoveState-03.adoc[`setCopyMoveState`] 
| `setCopyMoveState` overloads
| xref:BloombergLP/bsltf/setMovedInto-06.adoc[`setMovedInto`] 
| `setMovedInto` overloads
| xref:BloombergLP/bsltf/swap-08.adoc[`swap`] 
| `swap` overloads
| xref:BloombergLP/bsltf/operator_lshift-0b.adoc[`operator&lt;&lt;`] 
| Stream the integer representing the value of the specified `object` to the specified `stream`&period; Return `stream`&period;
| xref:BloombergLP/bsltf/operator_not.adoc[`operator!`] 
| Return `true` if `value` is `e&lowbar;ORIGINAL`&semi; otherwise return `false`&period;
| xref:BloombergLP/bsltf/operator_eq-049.adoc[`operator&equals;&equals;`] 
| Equality operators
| xref:BloombergLP/bsltf/operator_not_eq-0bd7.adoc[`operator!&equals;`] 
| Inequality operators
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
