1 /*=============================================================================
2 Copyright (c) 2001-2013 Joel de Guzman
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 #if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821)
8 #define BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/support/detail/access.hpp>
12 #include <boost/utility/declval.hpp>
14 namespace boost { namespace fusion
20 template <typename Tag>
24 struct at_impl<map_tag>
26 template <typename Sequence, typename N>
29 typedef mpl::int_<N::value> index;
31 decltype(boost::declval<Sequence>().get(index()))
34 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 return m.get(index());
42 template <typename Sequence, typename N>
43 struct apply<Sequence const, N>
45 typedef mpl::int_<N::value> index;
47 decltype(boost::declval<Sequence const>().get(index()))
50 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
52 call(Sequence const& m)
54 return m.get(index());