BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::Util Struct Reference

#include <bsls_util.h>

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.

Member Function Documentation

◆ addressOf() [1/4]

template<class RESULT >
Util_Identity< RESULT()>::type * bsls::Util::addressOf ( RESULT(&)()  fn)
inlinestatic

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.

◆ addressOf() [2/4]

template<class RESULT , class ARG >
Util_Identity< RESULT(ARG)>::type * bsls::Util::addressOf ( RESULT(&)(ARG)  fn)
inlinestatic

◆ addressOf() [3/4]

template<class RESULT , class ARG1 , class ARG2 >
Util_Identity< RESULT(ARG1, ARG2)>::type * bsls::Util::addressOf ( RESULT(&)(ARG1, ARG2)  fn)
inlinestatic

◆ addressOf() [4/4]

template<class TYPE >
TYPE * bsls::Util::addressOf ( TYPE &  obj)
inlinestatic

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.


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