File indexing completed on 2025-01-30 09:44:55
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_LOCAL_FUNCTION_AUX_MEMBER_HPP_
0009 #define BOOST_LOCAL_FUNCTION_AUX_MEMBER_HPP_
0010
0011 namespace boost { namespace local_function { namespace aux {
0012
0013
0014
0015 template<typename T> struct member_type {
0016 typedef T& reference;
0017 typedef T* pointer;
0018 };
0019
0020 template<typename T> struct member_type<T*> {
0021 typedef T*& reference;
0022 typedef T* pointer;
0023 };
0024
0025 template<typename T> struct member_type<T* const> {
0026 typedef T* const& reference;
0027 typedef T* pointer;
0028 };
0029
0030 template<typename T> struct member_type<T const*> {
0031 typedef T const*& reference;
0032 typedef T const* pointer;
0033 };
0034
0035 template<typename T> struct member_type<T const* const> {
0036 typedef T const* const& reference;
0037 typedef T const* pointer;
0038 };
0039
0040
0041 template<typename T> T* member_addr(T& data) { return &data; }
0042 template<typename T> T* member_addr(T* data) { return data; }
0043
0044
0045 template<typename T> T& member_deref(T& data) { return data; }
0046 template<typename T> T& member_deref(T* data) { return *data; }
0047
0048 } } }
0049
0050 #endif
0051