/*============================================================================= 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_AT_IMPL_20060124_1933) #define FUSION_AT_IMPL_20060124_1933 #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace fusion { struct zip_view_tag; namespace detail { template struct poly_at { template struct result; template struct result(SeqRef)> : mpl::eval_if, mpl::identity, result_of::at::type, N> > { BOOST_MPL_ASSERT((is_reference)); }; template BOOST_FUSION_GPU_ENABLED typename result::type operator()(Seq& seq) const { return fusion::at(seq); } template BOOST_FUSION_GPU_ENABLED typename result::type operator()(Seq const& seq) const { return fusion::at(seq); } BOOST_FUSION_GPU_ENABLED unused_type operator()(unused_type const&) const { return unused_type(); } }; } namespace extension { template struct at_impl; template<> struct at_impl { template struct apply { typedef typename result_of::as_vector< typename result_of::transform< typename Seq::sequences, detail::poly_at >::type>::type type; BOOST_FUSION_GPU_ENABLED static type call(Seq& seq) { return type( fusion::transform(seq.sequences_, detail::poly_at())); } }; }; } }} #endif