mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Make local classes nonlocal to silence annoying warnings from Borland C++
[SVN r13418]
This commit is contained in:
parent
0a0296a5d0
commit
ec188c7c3e
@ -17,35 +17,36 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail {
|
||||
struct addressof_helper {};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T* addressof(T& v)
|
||||
{
|
||||
struct addressof_helper {};
|
||||
return reinterpret_cast<T*>(&reinterpret_cast<addressof_helper&>(v));
|
||||
return reinterpret_cast<T*>(
|
||||
&reinterpret_cast<detail::addressof_helper&>(v));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const T* addressof(const T& v)
|
||||
{
|
||||
struct addressof_helper {};
|
||||
return reinterpret_cast<const T*>(
|
||||
&reinterpret_cast<const addressof_helper&>(v));
|
||||
&reinterpret_cast<const detail::addressof_helper&>(v));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline volatile T* addressof(volatile T& v)
|
||||
{
|
||||
struct addressof_helper {};
|
||||
return reinterpret_cast<volatile T*>(
|
||||
&reinterpret_cast<volatile addressof_helper&>(v));
|
||||
&reinterpret_cast<volatile detail::addressof_helper&>(v));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const volatile T* addressof(const volatile T& v)
|
||||
{
|
||||
struct addressof_helper {};
|
||||
return reinterpret_cast<const volatile T*>(
|
||||
&reinterpret_cast<const volatile addressof_helper&>(v));
|
||||
&reinterpret_cast<const volatile detail::addressof_helper&>(v));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user