From ec188c7c3e2e270d956e5c8768e9d4a5522b728d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 10 Apr 2002 04:00:22 +0000 Subject: [PATCH] Make local classes nonlocal to silence annoying warnings from Borland C++ [SVN r13418] --- include/boost/utility/addressof.hpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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)); } }