Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:41:56

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(FUSION_VALUE_OF_IMPL_20060124_2147)
0009 #define FUSION_VALUE_OF_IMPL_20060124_2147
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/container/vector/convert.hpp>
0013 #include <boost/fusion/algorithm/transformation/transform.hpp>
0014 #include <boost/fusion/iterator/value_of.hpp>
0015 #include <boost/mpl/placeholders.hpp>
0016 #include <boost/fusion/support/unused.hpp>
0017 #include <boost/mpl/eval_if.hpp>
0018 #include <boost/mpl/identity.hpp>
0019 #include <boost/type_traits/is_same.hpp>
0020 #include <boost/config.hpp>
0021 
0022 namespace boost { namespace fusion
0023 {
0024     struct zip_view_iterator_tag;
0025 
0026     namespace detail
0027     {
0028         struct poly_value_of
0029         {
0030             template<typename T>
0031             struct result;
0032 
0033             template<typename It>
0034             struct result<poly_value_of(It)>
0035                 : mpl::eval_if<is_same<It, unused_type>,
0036                                mpl::identity<unused_type>,
0037                                result_of::value_of<It> >
0038             {};
0039 
0040             // never called, but needed for decltype-based result_of (C++0x)
0041 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
0042             template<typename It>
0043             BOOST_FUSION_GPU_ENABLED
0044             typename result<poly_value_of(It)>::type
0045             operator()(It&&) const;
0046 #endif
0047         };
0048     }
0049 
0050     namespace extension
0051     {
0052         template<typename Tag>
0053         struct value_of_impl;
0054 
0055         template<>
0056         struct value_of_impl<zip_view_iterator_tag>
0057         {
0058             template<typename Iterator>
0059             struct apply
0060             {
0061                 typedef typename result_of::transform<
0062                     typename Iterator::iterators,
0063                     detail::poly_value_of>::type values;
0064 
0065                 typedef typename result_of::as_vector<values>::type type;
0066             };
0067         };
0068     }
0069 }}
0070 
0071 #endif