This visitor swaps the variant object data that it holds with another variant object data of parameterize TYPE.
Declared in <bdlb_variant.h>
struct Variant_SwapVisitor;
It requires that the two variant objects being swapped contain data of the same type, and use the same allocator.
| Name | Description |
|---|---|
Variant_SwapVisitor [constructor] | Create a swap visitor targeting the specified peer buffer. |
operator() | Swap the value of template parameter TYPE with the peer buffer supplied at construction. |
| Name | Description |
|---|---|
d_buffer_p | Peer buffer used for swapping. |