1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_VALUE_OF_IMPL_20060124_2147)
9 #define FUSION_VALUE_OF_IMPL_20060124_2147
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/container/vector/convert.hpp>
13 #include <boost/fusion/algorithm/transformation/transform.hpp>
14 #include <boost/fusion/iterator/value_of.hpp>
15 #include <boost/mpl/placeholders.hpp>
16 #include <boost/fusion/support/unused.hpp>
17 #include <boost/mpl/eval_if.hpp>
18 #include <boost/mpl/identity.hpp>
19 #include <boost/type_traits/is_same.hpp>
20 #include <boost/config.hpp>
22 namespace boost { namespace fusion
24 struct zip_view_iterator_tag;
34 struct result<poly_value_of(It)>
35 : mpl::eval_if<is_same<It, unused_type>,
36 mpl::identity<unused_type>,
37 result_of::value_of<It> >
40 // never called, but needed for decltype-based result_of (C++0x)
41 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
43 BOOST_FUSION_GPU_ENABLED
44 typename result<poly_value_of(It)>::type
45 operator()(It&&) const;
52 template<typename Tag>
56 struct value_of_impl<zip_view_iterator_tag>
58 template<typename Iterator>
61 typedef typename result_of::transform<
62 typename Iterator::iterators,
63 detail::poly_value_of>::type values;
65 typedef typename result_of::as_vector<values>::type type;