1 /*============================================================================= 2 Copyright (c) 2001-2011 Joel de Guzman 3 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 ==============================================================================*/ 7 #if !defined(FUSION_ACCESS_04182005_0737) 8 #define FUSION_ACCESS_04182005_0737 9 10 #include <boost/fusion/support/config.hpp> 11 #include <boost/type_traits/add_const.hpp> 12 #include <boost/type_traits/add_reference.hpp> 13 14 namespace boost { namespace fusion { namespace detail 15 { 16 template <typename T> 17 struct ref_result 18 { 19 typedef typename add_reference<T>::type type; 20 }; 21 22 template <typename T> 23 struct cref_result 24 { 25 typedef typename 26 add_reference< 27 typename add_const<T>::type 28 >::type 29 type; 30 }; 31 32 template <typename T> 33 struct call_param 34 { 35 typedef T const& type; 36 }; 37 38 template <typename T> 39 struct call_param<T&> 40 { 41 typedef T& type; 42 }; 43 44 template <typename T> 45 struct call_param<T const> 46 { 47 typedef T const& type; 48 }; 49 50 template <typename T> 51 struct call_param<T volatile> 52 { 53 typedef T const& type; 54 }; 55 56 template <typename T> 57 struct call_param<T const volatile> 58 { 59 typedef T const& type; 60 }; 61 62 }}} 63 64 #endif 65 66