File indexing completed on 2025-01-18 09:50:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_PROTO_FUNCTIONAL_FUSION_AT_HPP_EAN_11_27_2010
0010 #define BOOST_PROTO_FUNCTIONAL_FUSION_AT_HPP_EAN_11_27_2010
0011
0012 #include <boost/type_traits/add_const.hpp>
0013 #include <boost/type_traits/remove_const.hpp>
0014 #include <boost/type_traits/remove_reference.hpp>
0015 #include <boost/fusion/include/at.hpp>
0016 #include <boost/proto/proto_fwd.hpp>
0017
0018 namespace boost { namespace proto { namespace functional
0019 {
0020
0021
0022
0023
0024
0025 struct at
0026 {
0027 BOOST_PROTO_CALLABLE()
0028
0029 template<typename Sig>
0030 struct result;
0031
0032 template<typename This, typename Seq, typename N>
0033 struct result<This(Seq, N)>
0034 : fusion::result_of::at<
0035 typename boost::remove_reference<Seq>::type
0036 , typename boost::remove_const<typename boost::remove_reference<N>::type>::type
0037 >
0038 {};
0039
0040 template<typename Seq, typename N>
0041 typename fusion::result_of::at<Seq, N>::type
0042 operator ()(Seq &seq, N const & BOOST_PROTO_DISABLE_IF_IS_CONST(Seq)) const
0043 {
0044 return fusion::at<N>(seq);
0045 }
0046
0047 template<typename Seq, typename N>
0048 typename fusion::result_of::at<Seq const, N>::type
0049 operator ()(Seq const &seq, N const &) const
0050 {
0051 return fusion::at<N>(seq);
0052 }
0053 };
0054 }}}
0055
0056 #endif