• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2009 Hartmut Kaiser
3 
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 ==============================================================================*/
7 
8 #if !defined(BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM)
9 #define BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM
10 
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/iterator/deref.hpp>
13 #include <boost/fusion/container/vector.hpp>
14 
15 namespace boost { namespace fusion
16 {
17     struct nview_iterator_tag;
18 
19     template <typename Sequence, typename Pos>
20     struct nview_iterator;
21 
22     namespace extension
23     {
24         template <typename Tag>
25         struct value_of_impl;
26 
27         template <>
28         struct value_of_impl<nview_iterator_tag>
29         {
30             template <typename Iterator>
31             struct apply
32             {
33                 typedef typename Iterator::first_type first_type;
34                 typedef typename Iterator::sequence_type sequence_type;
35 
36                 typedef typename result_of::deref<first_type>::type index;
37                 typedef typename result_of::at<
38                     typename sequence_type::sequence_type, index>::type type;
39             };
40         };
41     }
42 
43 }}
44 
45 #endif
46