Name |
Description |
AllocArgumentType
|
This class template declares a separate type for each template parameter value N, bsltf::AllocArgumentType<N>, that wraps an integer value and provides implicit conversion to and from int. The wrapped integer will be dynamically allocated using the supplied allocator, or the default allocator if none is supplied. 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‐place constructors. It further tests that allocators are propagated correctly, or not, as required. |
AllocBitwiseMoveableTestType
|
This unconstrained (value‐semantic) attribute class that is bitwise‐moveable, uses a bslma::Allocator to supply memory, and defines the type traits bslma::UsesBslmaAllocator and bslmf::IsBitwiseMoveable. See the section for information on the class attributes. |
AllocEmplacableTestType
|
This class provides a test object used to check that the arguments passed for creating an object with an in‐place representation are of the correct types and values. |
AllocTestType
|
This unconstrained (value‐semantic) attribute class that uses a bsl::allocator<> to supply memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user‐defined types having an allocator. See the Attributes section under DESCRIPTION in the component‐level documentation for information on the class attributes. |
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. Its main purpose is for following an argument through a forwarding interface in test drivers. 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‐class methods and constructors or in calls to methods and constructors of a class template under test. When an object of this type is copied or moved (via construction or assignment), the value returned by the copyMoveState accessor (the copy/move state), is updated for the target object and, in the case of a move, for the source object as well. |
ArgumentTypeByValue
|
This class works around a limitation in C++03 whereby initializing a pass‐by‐value parameter of type bslmf::ArgumentType<N> from a MovableRef<bslmf::ArgumentType<N> > results in an ambiguous conversion sequence (i.e., MovableRef::operator T& vs. ArgumentType(MovableRef) are equally good conversions). Pass‐by‐value use cases (e.g., recording the value category of multiple function arguments) can use this class as a parameter type, instead, eliminating the ambiguity because MovableRef<AT> ‐> AT& ‐> ArgumentTypeByValue requires two user‐defined conversions and is therefore eliminated during overload resolution. |
ArgumentTypeDefault
|
Empty class used as a default argument initializer for ArgumentType. Example usage: ` void func(ArgumentTypeByValue<1> arg1 = ArgumentTypeDefault(), ArgumentTypeByValue<2> arg2 = ArgumentTypeDefault()); ` |
BitwiseCopyableTestType
|
This unconstrained (value‐semantic) attribute class defines the bsl::is_trivially_copyable trait and does not allocate memory. See the section for information on the class attributes. |
BitwiseMoveableTestType
|
This unconstrained (value‐semantic) attribute class defines the bslmf::IsBitwiseMoveable and does not allocate memory. See the section for information on the class attributes. |
ConvertibleValueWrapper
|
This class provides a wrapper around an object of the specified (template parameter) TYPE. TYPE shall be CopyConstructible. If TYPE is a value‐semantic type, then this class will also be value semantic. Objects of this type are implicitly convertible to and from objects of the specified TYPE. |
CopyMoveState
|
Namespace for enumerators and helpers describing copy/move history of test objects. |
CopyMoveTracker
|
Type that tracks whether it has been copied into, moved into, or moved from. |
DegenerateFunctor
|
This test class template adapts a CopyConstructible class to offer a minimal or outright obstructive interface for testing generic code. 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. This class will further be Swappable if (the template parameter) ENABLE_SWAP is true and the adapted FUNCTOR is MoveConstructible. The (inherited) function call operator should be the only other available method, no other operation (e.g., the unary address‐of operator) should be usable. 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. 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. |
EmplacableTestType
|
This class provides a test object used to check that the arguments passed for creating an object with an in‐place representation are of the correct type and value. |
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.2.7 of the C++11 standard). |
EvilBooleanType
|
This class provides a test type for predicates returning a type that is convertible‐to‐bool. It makes life reasonably difficult by disabling the address‐of and comma operators, but deliberately does not overload the && and || operators, as we hope the standard will be updated to no longer require such support. Once C++11 becomes available, this class would use an explicit operator bool() conversion operator, and explicitly supply the == and != operators, but we use the convertible‐to‐pointer‐to‐member idiom in the meantime. Implicitly defined operations fill out the API as needed. |
InputIterator
|
|
InputIteratorUtil
|
This namespace struct allows the easy creation of begin and end iterators from a variety of contiguous range types. Either the argument must be an array, or a container that supports the following operations: * size() * operator (if 0 != size()) |
MovableAllocTestType
|
This class provides an unconstrained (value‐semantic) attribute type that records when move semantics have been invoked with the object instance as the source parameter. The class uses a bslma::Allocator to allocate memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates where move semantics need to be differentiated versus copy semantics. See the Attributes section under DESCRIPTION in the component‐level documentation for information on the class attributes. |
MovableTestType
|
This class provides an unconstrained (value‐semantic) attribute type that records when move semantics have been invoked with the object instance as the source parameter. This class is primarily provided to facilitate testing of templates where move semantics need to be differentiated versus copy semantics. See the Attributes section under DESCRIPTION in the component‐level documentation for information on the class attributes. |
MoveOnlyAllocTestType
|
This unconstrained (value‐semantic) attribute class that uses a bslma::Allocator to supply memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user‐defined types having an allocator. See the Attributes section under DESCRIPTION in the component‐level documentation for information on the class attributes. |
MoveState
|
Namespace for enumerators describing whether a test object was moved. |
NonAssignableTestType
|
This unconstrained (value‐semantic) attribute class does not provide an assignment operator. |
NonCopyConstructibleTestType
|
This unconstrained (value‐semantic) attribute class does not provide a copy constructor. |
NonDefaultConstructibleTestType
|
This unconstrained (value‐semantic) attribute class does not provide a default constructor. |
NonEqualComparableTestType
|
This unconstrained (value‐semantic) attribute class does not provide equality‐comparison operators. |
NonOptionalAllocTestType
|
This unconstrained (value‐semantic) attribute class that uses a bslma::Allocator to allocate memory and defines the type trait bslma::UsesBslmaAllocator. This class does not provide a default constructor. |
NonTypicalOverloadsTestType
|
This unconstrained (value‐semantic) attribute class ensures that the operator new member and operator delete member never gets called by overloading and asserting in them. See the Attributes section under DESCRIPTION in the component‐level documentation for information on the class attributes. |
SimpleTestType
|
This unconstrained (value‐semantic) attribute class does not allocate memory and does not define any traits. See the section for information on the class attributes. |
StdAllocTestType
|
This unconstrained (value‐semantic) attribute class uses a standard allocator of (template parameter) type ALLOC to allocate memory. This class does NOT define the type trait bslma::UsesBslmaAllocator, but the trait will be true if ALLOC is convertible from bslma::Allocator * (e.g., if it is an instantiation of bsl::allocator). This class is primarily provided to facilitate testing of templates by defining a simple type representative of user‐defined types using a standard allocator. See the section for information on the class attributes. |
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. |
StdStatefulAllocator
|
This allocator implements the minimal interface to comply with section 17.6.3.5 ([allocator.requirements]) of the C++11 standard, while maintaining a distinct object state ‐ in this case a wrapped pointer to a bslma::Allocator. The template is configurable to control its allocator propagation properties, but does not support the BDE "scoped" allocator model, as scoped allocators should never propagate. Instances of this allocator delegate their operations to the wrapped allocator that constitutes its state. Note that while we define the various traits used by the C++11 allocator traits facility, they actually mean very little for this component, as it is the consumer of the allocator's responsibility to check and apply the traits correctly, typically by using bsl::allocator_traits to perform all memory allocation tasks rather than using the allocator directly. The PROPAGATE_ON_CONTAINER_COPY_CONSTRUCTION flag is consumed directly though, in the static member function select_on_container_copy_construction. |
StdTestAllocator
|
This allocator implements the minimal interface to comply with section 20.1.5 ([lib.allocator.requirements]) of the C++03 standard. Instances of this allocator delegate their operations to a globally configured delegate allocator as C++03 compliant allocators cannot have individually identifiable state (see StdTestAllocatorConfiguration and 'StdTestAllocatorConfigurationGuard). |
StdTestAllocatorConfiguration
|
This struct provides a namespace for functions that manipulate and access the delegate allocator for StdTestAllocator. The delegate allocator is the allocator to which StdTestAllocator objects delegate their operations. The provided operations are not thread‐safe. Note that this allocator is configured globally as C++03 standard compliant allocators cannot have individually identifiable state. |
StdTestAllocatorConfigurationGuard
|
Upon construction, an object of this class saves the current *delegate allocator* for StdTestAllocator and and installs the user‐specified allocator as the delegate allocator. The delegate allocator is the globally configured allocator to which an StdTestAllocator objects delegate their operations. On destruction, the original delegate allocator is restored. |
StdTestAllocator_CommonUtil
|
This struct provides a namespace for utilities that are common to all instantiations of the StdTestAllocator class template. |
TemplateTestFacility
|
This struct provides a namespace that contains three aliases for types intended to be used as template parameters for testing templates. 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. The identifier value returned from the getIdentifier method is undefined unless the specified object was originally created with the create class method template. |
TemplateTestFacility_CompareHelper
|
Component‐private helper providing equality comparisons for test types. |
TemplateTestFacility_StubClass
|
This class provides a single method template, method, that simply returns the parameterized integer IDENTIFIER. Note that the purpose of this class is to serve as a stub class and method to be referred by TemplateTestFacility::ObjectPtr and TemplateTestFacility::MethodPtr respectively. |
TestValuesArray
|
This class provides a container to store values of the (template parameter) type VALUE, and also provides the iterators to access the values. The iterators are designed to conform to a standard input iterator, and report any misuse of the iterator. |
TestValuesArrayIterator
|
This class provide a STL‐conforming input iterator over values used for testing (see section [24.2.3 input.iterators]of the C++11 standard. A TestValuesArrayIterator provide access to elements of parameterized type VALUE. An iterator is considered dereferenceable all of the following are satisfied: 1. The iterator refers to a valid element (not end). 2. The iterator has not been dereferenced. 3. The iterator is not a copy of another iterator of which operator++ have been invoked. An iterator is comparable if the iterator is not a copy of another iterator of which operator++ have been invoked. |
TestValuesArraySentinel
|
|
TestValuesArray_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. |
TestValuesArray_PostIncrementPtr
|
This class is a wrapper that encapsulates a reference, providing non‐modifiable access to the element of TestValuesArray container. Object of this class is returned by post increment operator of TestValuesArray' container. |
UnionTestType
|
This union provides a union test type to facilitate testing of templates. |
WellBehavedMoveOnlyAllocTestType
|
This unconstrained (value‐semantic) attribute class that uses a bslma::Allocator to supply memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user‐defined types having an allocator. See the section for information on the class attributes. |