BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmf::MovableRef< t_TYPE > Class Template Reference

#include <bslmf_movableref.h>

Public Member Functions

 operator t_TYPE & () const
 

Friends

struct MovableRefUtil
 

Detailed Description

template<class t_TYPE>
class bslmf::MovableRef< t_TYPE >

The class template MovableRef<t_TYPE> provides a reference to a movable object of type t_TYPE. Put differently, a function receiving an object this class template can transfer (move) the representation to a different object and leave the referenced object in an unspecified, although valid (i.e., it obeys all class invariants), state. With C++11 an r-value reference (t_TYPE&&) is used to represent the same semantics.

See bslmf_movableref

Member Function Documentation

◆ operator t_TYPE &()

template<class t_TYPE >
bslmf::MovableRef< t_TYPE >::operator t_TYPE & ( ) const
inline

Return a reference to the referenced object. In contexts where a reference to an object of type t_TYPE is needed, a MovableRef<t_TYPE> behaves like such a reference. For information on how to access the reference in contexts where no conversion can be used see MovableRefUtil::access().

Friends And Related Symbol Documentation

◆ MovableRefUtil

template<class t_TYPE >
friend struct MovableRefUtil
friend

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