File indexing completed on 2025-01-18 09:34:59
0001
0002
0003
0004
0005
0006
0007
0008
0009 #if !defined(BOOST_FUSION_AT_IMPL_20061029_1946)
0010 #define BOOST_FUSION_AT_IMPL_20061029_1946
0011
0012 #include <boost/fusion/support/config.hpp>
0013 #include <boost/fusion/sequence/intrinsic/at.hpp>
0014 #include <boost/utility/result_of.hpp>
0015
0016 namespace boost { namespace fusion {
0017 struct transform_view_tag;
0018 struct transform_view2_tag;
0019
0020 namespace extension
0021 {
0022 template<typename Tag>
0023 struct at_impl;
0024
0025 template<>
0026 struct at_impl<transform_view_tag>
0027 {
0028 template<typename Seq, typename N>
0029 struct apply
0030 {
0031 typedef typename Seq::transform_type F;
0032 typedef typename result_of::at<typename Seq::sequence_type, N>::type value_type;
0033 typedef typename boost::result_of<F(value_type)>::type type;
0034
0035 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0036 static type call(Seq& seq)
0037 {
0038 return seq.f(boost::fusion::at<N>(seq.seq));
0039 }
0040 };
0041 };
0042
0043 template<>
0044 struct at_impl<transform_view2_tag>
0045 {
0046 template<typename Seq, typename N>
0047 struct apply
0048 {
0049 typedef typename Seq::transform_type F;
0050 typedef typename result_of::at<typename Seq::sequence1_type, N>::type value1_type;
0051 typedef typename result_of::at<typename Seq::sequence2_type, N>::type value2_type;
0052 typedef typename boost::result_of<F(value1_type, value2_type)>::type type;
0053
0054 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0055 static type call(Seq& seq)
0056 {
0057 return seq.f(boost::fusion::at<N>(seq.seq1), boost::fusion::at<N>(seq.seq2));
0058 }
0059 };
0060 };
0061 }
0062 }}
0063
0064 #endif