File indexing completed on 2025-01-18 09:50:32
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_PROTO_ARGS_HPP_EAN_04_01_2005
0011 #define BOOST_PROTO_ARGS_HPP_EAN_04_01_2005
0012
0013 #include <boost/preprocessor/cat.hpp>
0014 #include <boost/preprocessor/arithmetic/dec.hpp>
0015 #include <boost/preprocessor/iteration/iterate.hpp>
0016 #include <boost/preprocessor/repetition/enum_params.hpp>
0017 #include <boost/preprocessor/repetition/repeat.hpp>
0018 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
0019 #include <boost/mpl/if.hpp>
0020 #include <boost/mpl/void.hpp>
0021 #include <boost/proto/proto_fwd.hpp>
0022 #include <boost/proto/detail/is_noncopyable.hpp>
0023
0024 #include <boost/mpl/or.hpp>
0025 #include <boost/type_traits/is_function.hpp>
0026 #include <boost/type_traits/is_abstract.hpp>
0027
0028 namespace boost { namespace proto
0029 {
0030 namespace detail
0031 {
0032
0033 template<typename Expr>
0034 struct expr_traits
0035 {
0036 typedef Expr value_type;
0037 typedef Expr &reference;
0038 typedef Expr const &const_reference;
0039 };
0040
0041
0042 template<typename Expr>
0043 struct expr_traits<Expr &>
0044 {
0045 typedef Expr value_type;
0046 typedef Expr &reference;
0047 typedef Expr &const_reference;
0048 };
0049
0050
0051 template<typename Expr>
0052 struct expr_traits<Expr const &>
0053 {
0054 typedef Expr value_type;
0055 typedef Expr const &reference;
0056 typedef Expr const &const_reference;
0057 };
0058
0059
0060 template<typename T>
0061 struct term_traits
0062 {
0063 typedef T value_type;
0064 typedef T &reference;
0065 typedef T const &const_reference;
0066 };
0067
0068
0069 template<typename T>
0070 struct term_traits<T &>
0071 {
0072 typedef typename mpl::if_c<is_noncopyable<T>::value, T &, T>::type value_type;
0073 typedef T &reference;
0074 typedef T &const_reference;
0075 };
0076
0077
0078 template<typename T>
0079 struct term_traits<T const &>
0080 {
0081 typedef T value_type;
0082 typedef T const &reference;
0083 typedef T const &const_reference;
0084 };
0085
0086
0087 template<typename T, std::size_t N>
0088 struct term_traits<T (&)[N]>
0089 {
0090 typedef T value_type[N];
0091 typedef T (&reference)[N];
0092 typedef T (&const_reference)[N];
0093 };
0094
0095
0096 template<typename T, std::size_t N>
0097 struct term_traits<T const (&)[N]>
0098 {
0099 typedef T value_type[N];
0100 typedef T const (&reference)[N];
0101 typedef T const (&const_reference)[N];
0102 };
0103
0104
0105 template<typename T, std::size_t N>
0106 struct term_traits<T[N]>
0107 {
0108 typedef T value_type[N];
0109 typedef T (&reference)[N];
0110 typedef T const (&const_reference)[N];
0111 };
0112
0113
0114 template<typename T, std::size_t N>
0115 struct term_traits<T const[N]>
0116 {
0117 typedef T value_type[N];
0118 typedef T const (&reference)[N];
0119 typedef T const (&const_reference)[N];
0120 };
0121 }
0122
0123 namespace argsns_
0124 {
0125
0126 #include <boost/proto/detail/args.hpp>
0127 }
0128
0129 }}
0130
0131 #endif
0132