1 /*=============================================================================
2 Copyright (c) 2014,2018 Kohei Takahashi
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #ifndef FUSION_VALUE_AT_IMPL_16122014_1641
8 #define FUSION_VALUE_AT_IMPL_16122014_1641
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/container/vector/detail/config.hpp>
13 ///////////////////////////////////////////////////////////////////////////////
14 // Without variadics, we will use the PP version
15 ///////////////////////////////////////////////////////////////////////////////
16 #if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
17 # include <boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp>
20 ///////////////////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////////////////
23 #include <boost/fusion/container/vector/vector_fwd.hpp>
24 #include <boost/type_traits/declval.hpp>
25 #include <boost/mpl/identity.hpp>
27 namespace boost { namespace fusion
31 namespace vector_detail
33 template <std::size_t I, typename T>
36 template <std::size_t N, typename U>
37 static inline BOOST_FUSION_GPU_ENABLED
38 mpl::identity<U> value_at_impl(store<N, U> const volatile*);
43 template <typename Tag>
47 struct value_at_impl<vector_tag>
49 template <typename Sequence, typename N>
50 struct apply : BOOST_FUSION_DECLTYPE_N3031((
51 vector_detail::value_at_impl<N::value>(boost::declval<Sequence*>())