12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #ifndef BOOST_RANDOM_DETAIL_PTR_HELPER_HPP
- #define BOOST_RANDOM_DETAIL_PTR_HELPER_HPP
- #include <boost/config.hpp>
- namespace boost {
- namespace random {
- namespace detail {
- template<class T>
- struct ptr_helper
- {
- typedef T value_type;
- typedef T& reference_type;
- typedef const T& rvalue_type;
- static reference_type ref(T& r) { return r; }
- static const T& ref(const T& r) { return r; }
- };
- template<class T>
- struct ptr_helper<T&>
- {
- typedef T value_type;
- typedef T& reference_type;
- typedef T& rvalue_type;
- static reference_type ref(T& r) { return r; }
- static const T& ref(const T& r) { return r; }
- };
- template<class T>
- struct ptr_helper<T*>
- {
- typedef T value_type;
- typedef T& reference_type;
- typedef T* rvalue_type;
- static reference_type ref(T * p) { return *p; }
- static const T& ref(const T * p) { return *p; }
- };
- }
- }
- }
- # define BOOST_RANDOM_PTR_HELPER_SPEC(T)
- #endif
|