Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Friends

bslmf::MovableRef< t_TYPE > Class Template Reference

#include <bslmf_movableref.h>

List of all members.

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 Component bslmf_movableref


Member Function Documentation

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

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 Function Documentation

template<class t_TYPE>
friend struct MovableRefUtil [friend]

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