Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

bsls::Util Struct Reference

#include <bsls_util.h>

List of all members.

Static Public Member Functions

template<class TYPE >
static TYPE * addressOf (TYPE &obj)
template<class RESULT >
static Util_Identity< RESULT()>
::type
addressOf (RESULT(&fn)())
template<class RESULT , class ARG >
static Util_Identity< RESULT(ARG)>
::type
addressOf (RESULT(&fn)(ARG))
template<class RESULT , class ARG1 , class ARG2 >
static Util_Identity< RESULT(ARG1,
ARG2)>::type
addressOf (RESULT(&fn)(ARG1, ARG2))

Detailed Description

This struct provides a namespace for essential low-level functions for implementing portable generic facilities such as the C++ standard library.

See Component bsls_util


Member Function Documentation

template<class TYPE >
static TYPE* bsls::Util::addressOf ( TYPE &  obj  )  [static]

Return the address of the specified obj, even if operator& is overloaded for objects of type BSLS_TYPE. Behavior is undefined unless BSLS_TYPE is an object type. Note that this function conforms to the C++11 definition for addressof as specified in the section [specialized.addressof] (20.6.12.1) of the C++11 standard, except that function types, which are not object types, are supported by std::addressof in C++11.

Referenced by bslmf::MovableRefUtil::move_if_noexcept().

template<class RESULT >
static Util_Identity<RESULT()>::type* bsls::Util::addressOf ( RESULT(&)()  fn  )  [static]
template<class RESULT , class ARG >
static Util_Identity<RESULT(ARG)>::type* bsls::Util::addressOf ( RESULT(&)(ARG)  fn  )  [static]
template<class RESULT , class ARG1 , class ARG2 >
static Util_Identity<RESULT(ARG1, ARG2)>::type* bsls::Util::addressOf ( RESULT(&)(ARG1, ARG2)  fn  )  [static]

Return the address of the specified function fn. Note that this implementation supports functions of only a limited number of parameters, determined by the current needs of the BDE software. A more general form that will support an arbitrary number of function parameters will be available with C++11.


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