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_KEY_IMPL_02042013_0821)
0008 #define BOOST_FUSION_MAP_DETAIL_AT_KEY_IMPL_02042013_0821
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/detail/access.hpp>
0012 #include <boost/type_traits/is_const.hpp>
0013 #include <boost/mpl/at.hpp>
0014 #include <boost/mpl/identity.hpp>
0015 #include <boost/utility/declval.hpp>
0016 
0017 namespace boost { namespace fusion
0018 {
0019     struct map_tag;
0020 
0021     namespace extension
0022     {
0023         template <typename Tag>
0024         struct at_key_impl;
0025 
0026         template <>
0027         struct at_key_impl<map_tag>
0028         {
0029             template <typename Sequence, typename Key>
0030             struct apply
0031             {
0032                 typedef
0033                     decltype(boost::declval<Sequence>().get(mpl::identity<Key>()))
0034                 type;
0035 
0036                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0037                 static type
0038                 call(Sequence& m)
0039                 {
0040                     return m.get(mpl::identity<Key>());
0041                 }
0042             };
0043 
0044             template <typename Sequence, typename Key>
0045             struct apply<Sequence const, Key>
0046             {
0047                 typedef
0048                     decltype(boost::declval<Sequence const>().get(mpl::identity<Key>()))
0049                 type;
0050 
0051                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0052                 static type
0053                 call(Sequence const& m)
0054                 {
0055                     return m.get(mpl::identity<Key>());
0056                 }
0057             };
0058         };
0059     }
0060 }}
0061 
0062 #endif