File indexing completed on 2025-01-31 09:41:55
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM)
0009 #define BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/iterator/value_of.hpp>
0013 #include <boost/fusion/sequence/intrinsic/at.hpp>
0014
0015 namespace boost { namespace fusion
0016 {
0017 struct nview_iterator_tag;
0018
0019 namespace extension
0020 {
0021 template<typename Tag>
0022 struct deref_impl;
0023
0024 template<>
0025 struct deref_impl<nview_iterator_tag>
0026 {
0027 template<typename Iterator>
0028 struct apply
0029 {
0030 typedef typename Iterator::first_type first_type;
0031 typedef typename Iterator::sequence_type sequence_type;
0032
0033 typedef typename result_of::value_of<first_type>::type index;
0034 typedef typename result_of::at<
0035 typename sequence_type::sequence_type, index>::type type;
0036
0037 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0038 static type call(Iterator const& i)
0039 {
0040 return at<index>(i.seq.seq);
0041 }
0042 };
0043 };
0044
0045 }
0046
0047 }}
0048
0049 #endif
0050