/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_DEREF_IMPL_20061024_1959) #define FUSION_DEREF_IMPL_20061024_1959 #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace fusion { struct zip_view_iterator_tag; namespace detail { struct poly_deref { template struct result; template struct result { typedef typename remove_const< typename remove_reference::type>::type it; typedef typename mpl::eval_if, mpl::identity, result_of::deref >::type type; }; template BOOST_FUSION_GPU_ENABLED typename result::type operator()(const It& it) const { return fusion::deref(it); } BOOST_FUSION_GPU_ENABLED unused_type operator()(unused_type const&) const { return unused_type(); } }; } namespace extension { template struct deref_impl; template<> struct deref_impl { template struct apply { typedef typename result_of::as_vector< typename result_of::transform::type>::type type; BOOST_FUSION_GPU_ENABLED static type call(It const& it) { return type( fusion::transform(it.iterators_, detail::poly_deref())); } }; }; } }} #endif