1
0
forked from boostorg/core

Add free function to_address

This commit is contained in:
Glen Fernandes
2017-07-21 06:21:50 -04:00
parent 2876914d02
commit ac6044769f
3 changed files with 78 additions and 0 deletions

View File

@@ -239,6 +239,20 @@ struct pointer_traits<T*> {
};
#endif
template<class T>
inline typename pointer_traits<T>::element_type*
to_address(const T& v) BOOST_NOEXCEPT
{
return pointer_traits<T>::to_address(v);
}
template<class T>
inline T*
to_address(T* v) BOOST_NOEXCEPT
{
return v;
}
} /* boost */
#endif