File indexing completed on 2025-01-31 09:41:56
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(FUSION_VALUE_AT_IMPL_20060124_2129)
0009 #define FUSION_VALUE_AT_IMPL_20060124_2129
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/container/vector/convert.hpp>
0013 #include <boost/fusion/algorithm/transformation/transform.hpp>
0014 #include <boost/fusion/sequence/intrinsic/value_at.hpp>
0015 #include <boost/type_traits/remove_reference.hpp>
0016 #include <boost/fusion/support/unused.hpp>
0017 #include <boost/mpl/eval_if.hpp>
0018 #include <boost/mpl/identity.hpp>
0019 #include <boost/type_traits/is_same.hpp>
0020 #include <boost/config.hpp>
0021
0022 namespace boost { namespace fusion {
0023
0024 struct zip_view_tag;
0025
0026 namespace detail
0027 {
0028 template<typename N>
0029 struct poly_value_at
0030 {
0031 template<typename T>
0032 struct result;
0033
0034 template<typename N1, typename Seq>
0035 struct result<poly_value_at<N1>(Seq)>
0036 : mpl::eval_if<is_same<Seq, unused_type const&>,
0037 mpl::identity<unused_type>,
0038 result_of::value_at<typename remove_reference<Seq>::type, N> >
0039 {};
0040
0041
0042 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
0043 template<typename Seq>
0044 BOOST_FUSION_GPU_ENABLED
0045 typename result<poly_value_at(Seq)>::type
0046 operator()(Seq&&) const;
0047 #endif
0048 };
0049 }
0050
0051 namespace extension
0052 {
0053 template<typename Tag>
0054 struct value_at_impl;
0055
0056 template<>
0057 struct value_at_impl<zip_view_tag>
0058 {
0059 template<typename Sequence, typename N>
0060 struct apply
0061 {
0062 typedef typename result_of::transform<
0063 typename Sequence::sequences,
0064 detail::poly_value_at<N> >::type values;
0065 typedef typename result_of::as_vector<values>::type type;
0066 };
0067 };
0068 }
0069 }}
0070
0071 #endif