Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

bslmf::Util Struct Reference

#include <bslmf_util.h>

List of all members.

Static Public Member Functions

template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR
const t_TYPE & 
forward (const t_TYPE &t) BSLS_KEYWORD_NOEXCEPT
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR
MovableRef< t_TYPE > 
forward (MovableRef< t_TYPE > t) BSLS_KEYWORD_NOEXCEPT
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR
bsl::add_lvalue_reference
< t_TYPE >::type 
declval () BSLS_KEYWORD_NOEXCEPT
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR
const t_TYPE & 
forwardAsReference (const t_TYPE &t) BSLS_KEYWORD_NOEXCEPT
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR
const t_TYPE & 
forwardAsReference (MovableRef< t_TYPE > t) BSLS_KEYWORD_NOEXCEPT
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR
bsl::remove_reference< t_TYPE >
::type
moveIfSupported (t_TYPE &t) BSLS_KEYWORD_NOEXCEPT

Detailed Description

This struct provides several functions that are specified in the <utility> header of the C++ Standard, in order to support the bsl library implementation without cycles into the native standard library, and on platforms with only C++03 compilers available, where library features may be emulated.

See Component bslmf_util


Member Function Documentation

template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR const t_TYPE& bslmf::Util::forward ( const t_TYPE &  t  )  [static]
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR MovableRef<t_TYPE> bslmf::Util::forward ( MovableRef< t_TYPE >  t  )  [static]
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR bsl::add_lvalue_reference<t_TYPE>::type bslmf::Util::declval (  )  [static]

< Correctly forward the specified t argument based on the current compilation environment.

template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR const t_TYPE& bslmf::Util::forwardAsReference ( const t_TYPE &  t  )  [static]

< This function has no implementation. It exists to allow for the appearance of a temporary object of the specified type that can be used in unevaluated contexts.

template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR const t_TYPE& bslmf::Util::forwardAsReference ( MovableRef< t_TYPE >  t  )  [static]
template<class t_TYPE >
static BSLS_KEYWORD_CONSTEXPR bsl::remove_reference<t_TYPE>::type& bslmf::Util::moveIfSupported ( t_TYPE &  t  )  [static]

< Correctly forward the specified t argument as a reference type based on the current compilation environment. Note that this function differs from forward in that when using a C++03 compiler, MovableRef<t_T> is forwarded as const t_T& (rather than MovableRef<t_T>), which is important when forwarding to a facility (e.g., bdlf::BindUtil::bind) which does not support bslmf::MovableRef.


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