1 /*=============================================================================
2 Copyright (c) 2009 Hartmut Kaiser
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
8 #if !defined(BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM)
9 #define BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/sequence/intrinsic/at.hpp>
13 #include <boost/fusion/sequence/intrinsic/value_at.hpp>
15 namespace boost { namespace fusion
21 template<typename Tag>
25 struct at_impl<nview_tag>
27 template<typename Sequence, typename N>
30 typedef typename Sequence::sequence_type sequence_type;
31 typedef typename Sequence::index_type index_type;
33 typedef typename result_of::value_at<index_type, N>::type index;
34 typedef typename result_of::at<sequence_type, index>::type type;
36 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
40 return fusion::at<index>(seq.seq);