diff --git a/include/boost/utility/addressof.hpp b/include/boost/utility/addressof.hpp index ee997ff..11a9fd3 100644 --- a/include/boost/utility/addressof.hpp +++ b/include/boost/utility/addressof.hpp @@ -17,35 +17,36 @@ namespace boost { +namespace detail { + struct addressof_helper {}; +} + template inline T* addressof(T& v) { - struct addressof_helper {}; - return reinterpret_cast(&reinterpret_cast(v)); + return reinterpret_cast( + &reinterpret_cast(v)); } template inline const T* addressof(const T& v) { - struct addressof_helper {}; return reinterpret_cast( - &reinterpret_cast(v)); + &reinterpret_cast(v)); } template inline volatile T* addressof(volatile T& v) { - struct addressof_helper {}; return reinterpret_cast( - &reinterpret_cast(v)); + &reinterpret_cast(v)); } template inline const volatile T* addressof(const volatile T& v) { - struct addressof_helper {}; return reinterpret_cast( - &reinterpret_cast(v)); + &reinterpret_cast(v)); } }