15 #ifndef ECL_UTILITIES_REFERENCE_WRAPPER_HPP_ 16 #define ECL_UTILITIES_REFERENCE_WRAPPER_HPP_ 22 #include <ecl/mpl/bool.hpp> 40 return reinterpret_cast<T*
>(
41 &
const_cast<char&
>(
reinterpret_cast<const volatile char &
>(v)));
109 operator T& ()
const {
return *
obj_ptr; }
144 template <
typename T>
156 template <
typename T>
169 template <
typename T>
179 template <
typename T>
T * addressOf(T &v)
Returns the address of an object (uses correct c++ syntactics).
ReferenceWrapper< T const > cref(T const &wrapped_object)
virtual ~ReferenceWrapper()
Provides a wrapper which allows the original object to be passed like a reference.
Default action for detection of the reference wrapper type trait (false).
ReferenceWrapper< T > ref(T &wrapped_object)
Integral constant wrapper for boolean values.