swap overloads
Synopses
Declared in <bslma_allocatorutil.h>
If the specified allowed tag is bsl::true_type, swap the values of allocators at the specified pa and pb addresses using ADL swap (with std::swap in scope); otherwise, do nothing. The t_TYPE template parameter is typically an allocator type and the allowed flag is typically a propagation trait dependant on the calling context, such as propagate_on_container_swap. Instantiation will fail if allowed is false_type and t_TYPE is not swappable (i.e., because it lacks a publically available assignment operator). The behavior is undefined unless allowed is true_type or '*pa == *pb' before the call.
template<class t_TYPE>
static
void
swap(
t_TYPE* pa,
t_TYPE* pb,
bsl::false_type allowed);
Same as the preceding overload, when allowed is true_type.
template<class t_TYPE>
static
void
swap(
t_TYPE* pa,
t_TYPE* pb,
bsl::true_type allowed);
Created with MrDocs