Exchange the values of the specified lhs and rhs objects.

Synopsis

Declared in <bdlb_nullablevalue.h>

template<class TYPE>
void
swap(
    NullableValue<TYPE>& lhs,
    NullableValue<TYPE>& rhs)
requires BloombergLP::bslma::UsesBslmaAllocator<TYPE>::value;

Description

Exchange the values of the specified rhs and lhs objects. This function provides the no‐throw exception‐safety guarantee if the (template parameter) TYPE provides that guarantee, the two objects were created with the same allocator (if applicable), and the result of the isNull method for the two objects is the same; otherwise this function provides the basic guarantee.

Parameters

Name

Description

lhs

left‐hand operand

rhs

right‐hand operand

Created with MrDocs