Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:34:42

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 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(FUSION_VALUE_OF_05052005_1126)
0008 #define FUSION_VALUE_OF_05052005_1126
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/iterator_base.hpp>
0012 #include <boost/fusion/support/tag_of.hpp>
0013 
0014 namespace boost { namespace fusion
0015 {
0016     // Special tags:
0017     struct iterator_facade_tag; // iterator facade tag
0018     struct boost_array_iterator_tag; // boost::array iterator tag
0019     struct mpl_iterator_tag; // mpl sequence iterator tag
0020     struct std_pair_iterator_tag; // std::pair iterator tag
0021 
0022     namespace extension
0023     {
0024         template <typename Tag>
0025         struct value_of_impl
0026         {
0027             template <typename Iterator>
0028             struct apply {};
0029         };
0030 
0031         template <>
0032         struct value_of_impl<iterator_facade_tag>
0033         {
0034             template <typename Iterator>
0035             struct apply : Iterator::template value_of<Iterator> {};
0036         };
0037 
0038         template <>
0039         struct value_of_impl<boost_array_iterator_tag>;
0040 
0041         template <>
0042         struct value_of_impl<mpl_iterator_tag>;
0043 
0044         template <>
0045         struct value_of_impl<std_pair_iterator_tag>;
0046     }
0047 
0048     namespace result_of
0049     {
0050         template <typename Iterator>
0051         struct value_of
0052             : extension::value_of_impl<typename detail::tag_of<Iterator>::type>::
0053                 template apply<Iterator>
0054         {};
0055     }
0056 }}
0057 
0058 #endif