File indexing completed on 2025-01-18 09:34:40
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_AT_IMPL_05042005_0741)
0008 #define FUSION_AT_IMPL_05042005_0741
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/detail/access.hpp>
0012 #include <boost/fusion/container/vector/detail/value_at_impl.hpp>
0013 #include <boost/static_assert.hpp>
0014
0015 namespace boost { namespace fusion
0016 {
0017 struct vector_tag;
0018
0019 namespace extension
0020 {
0021 template <typename Tag>
0022 struct at_impl;
0023
0024 template <>
0025 struct at_impl<vector_tag>
0026 {
0027 template <typename Sequence, typename N>
0028 struct apply
0029 {
0030 typedef typename value_at_impl<vector_tag>::template apply<Sequence, N>::type element;
0031 typedef typename detail::ref_result<element>::type type;
0032
0033 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0034 static type
0035 call(Sequence& v)
0036 {
0037 BOOST_STATIC_ASSERT((N::value < Sequence::size::value));
0038 return v.at_impl(N());
0039 }
0040 };
0041
0042 template <typename Sequence, typename N>
0043 struct apply <Sequence const, N>
0044 {
0045 typedef typename value_at_impl<vector_tag>::template apply<Sequence, N>::type element;
0046 typedef typename detail::cref_result<element>::type type;
0047
0048 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0049 static type
0050 call(Sequence const& v)
0051 {
0052 BOOST_STATIC_ASSERT((N::value < Sequence::size::value));
0053 return v.at_impl(N());
0054 }
0055 };
0056 };
0057 }
0058 }}
0059
0060 #endif