BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslstl::Utility_ExchangeAssignOnDestruction< t_TYPE, t_OTHER_TYPE > Struct Template Reference

#include <bslstl_utility.h>

Detailed Description

template<class t_TYPE, class t_OTHER_TYPE>
struct bslstl::Utility_ExchangeAssignOnDestruction< t_TYPE, t_OTHER_TYPE >

This component-private class template is used to implement bsl::exchange in C++03. It performs an assignment in its destructor. See the implementation notes in the .cpp file for more information.

See bslstl_utility

Public Member Functions

 Utility_ExchangeAssignOnDestruction (t_TYPE &obj, t_OTHER_TYPE &newValue)
 
 ~Utility_ExchangeAssignOnDestruction () BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(false)
 

Public Attributes

t_TYPE & d_obj
 
t_OTHER_TYPE & d_newValue
 

Constructor & Destructor Documentation

◆ Utility_ExchangeAssignOnDestruction()

template<class t_TYPE , class t_OTHER_TYPE >
bslstl::Utility_ExchangeAssignOnDestruction< t_TYPE, t_OTHER_TYPE >::Utility_ExchangeAssignOnDestruction ( t_TYPE &  obj,
t_OTHER_TYPE &  newValue 
)
inline

Create a Utility_ExchangeAssignOnDestruction object that, on destruction, will assign the specified newValue to the specified obj.

◆ ~Utility_ExchangeAssignOnDestruction()

template<class t_TYPE , class t_OTHER_TYPE >
bslstl::Utility_ExchangeAssignOnDestruction< t_TYPE, t_OTHER_TYPE >::~Utility_ExchangeAssignOnDestruction ( )
inline

Destroy this object, performing the promised assignment.

Member Data Documentation

◆ d_newValue

template<class t_TYPE , class t_OTHER_TYPE >
t_OTHER_TYPE& bslstl::Utility_ExchangeAssignOnDestruction< t_TYPE, t_OTHER_TYPE >::d_newValue

◆ d_obj

template<class t_TYPE , class t_OTHER_TYPE >
t_TYPE& bslstl::Utility_ExchangeAssignOnDestruction< t_TYPE, t_OTHER_TYPE >::d_obj

The documentation for this struct was generated from the following file: