Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:33:39

0001 /*=============================================================================
0002     Copyright (c) 2001-2013 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821)
0008 #define BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/detail/access.hpp>
0012 #include <boost/utility/declval.hpp>
0013 
0014 namespace boost { namespace fusion
0015 {
0016     struct map_tag;
0017 
0018     namespace extension
0019     {
0020         template <typename Tag>
0021         struct at_impl;
0022 
0023         template <>
0024         struct at_impl<map_tag>
0025         {
0026             template <typename Sequence, typename N>
0027             struct apply
0028             {
0029                 typedef mpl::int_<N::value> index;
0030                 typedef
0031                     decltype(boost::declval<Sequence>().get(index()))
0032                 type;
0033 
0034                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0035                 static type
0036                 call(Sequence& m)
0037                 {
0038                     return m.get(index());
0039                 }
0040             };
0041 
0042             template <typename Sequence, typename N>
0043             struct apply<Sequence const, N>
0044             {
0045                 typedef mpl::int_<N::value> index;
0046                 typedef
0047                     decltype(boost::declval<Sequence const>().get(index()))
0048                 type;
0049 
0050                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0051                 static type
0052                 call(Sequence const& m)
0053                 {
0054                     return m.get(index());
0055                 }
0056             };
0057         };
0058     }
0059 }}
0060 
0061 #endif