|
BDE 4.14.0 Production release
|
#include <bslmf_movableref.h>
Classes | |
| struct | AddLvalueReference |
| struct | AddMovableReference |
| struct | Decay |
| struct | IsLvalueReference |
| struct | IsMovableReference |
| struct | IsReference |
| struct | RemoveReference |
Static Public Member Functions | |
| template<class t_TYPE > | |
| static t_TYPE & | access (t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT |
| template<class t_TYPE > | |
| static t_TYPE & | access (MovableRef< t_TYPE > ref) BSLS_KEYWORD_NOEXCEPT |
| template<class t_TYPE > | |
| static MovableRef< t_TYPE > | move (t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT |
| template<class t_TYPE > | |
| static MovableRef< typename bsl::remove_reference< t_TYPE >::type > | move (MovableRef< t_TYPE > reference) BSLS_KEYWORD_NOEXCEPT |
| template<class t_TYPE > | |
| static bsl::enable_if<!bsl::is_nothrow_move_constructible< t_TYPE >::value &&bsl::is_copy_constructible< t_TYPE >::value, constt_TYPE & >::type | move_if_noexcept (t_TYPE &lvalue) BSLS_KEYWORD_NOEXCEPT |
| template<class t_TYPE > | |
| static bsl::enable_if<!bsl::is_copy_constructible< t_TYPE >::value||bsl::is_nothrow_move_constructible< t_TYPE >::value, MovableRef< t_TYPE > >::type | move_if_noexcept (t_TYPE &lvalue) BSLS_KEYWORD_NOEXCEPT |
This struct provides a collection of utility functions operating on objects of type MovableRef<t_TYPE>. The primary use of these utilities to create a consistent notation for using the C++03 MovableRef<t_TYPE> objects and the C++11 t_TYPE&& r-value references.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Return a const-qualified reference to the specified lvalue. This function is selected by overload resolution if the move constructor for t_TYPE might throw an exception. Constructing a t_TYPE object from the result will result in the copy constructor being invoked rather than the (unsafe) move constructor.
|
inlinestatic |
Return a movable reference to the specified lvalue. This function is selected by overload resolution if the move constructor for t_TYPE is nothrow-move-constructible. Constructing a t_TYPE object from the result will result in the (safe) move constructor being invoked. Note that that the bsl::is_nothrow_move_constructible trait can be customized in C++03 mode to indicate that a type is nothrow-move-constructible.