]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/iterator/deref_data.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / iterator / deref_data.hpp
1 /*=============================================================================
2     Copyright (c) 2009 Christopher Schmidt
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 #ifndef BOOST_FUSION_ITERATOR_DEREF_DATA_HPP
9 #define BOOST_FUSION_ITERATOR_DEREF_DATA_HPP
10
11 #include <boost/fusion/support/tag_of.hpp>
12
13 namespace boost { namespace fusion
14 {
15     struct iterator_facade_tag;
16
17     namespace extension
18     {
19         template <typename>
20         struct deref_data_impl;
21
22         template <>
23         struct deref_data_impl<iterator_facade_tag>
24         {
25             template <typename It>
26             struct apply
27               : It::template deref_data<It>
28             {};
29        };
30     }
31
32     namespace result_of
33     {
34         template <typename It>
35         struct deref_data
36           : extension::deref_data_impl<typename traits::tag_of<It>::type>::
37                 template apply<It>
38         {};
39     }
40
41     template <typename It>
42     typename result_of::deref_data<It>::type
43     deref_data(It const& it)
44     {
45         return result_of::deref_data<It>::call(it);
46     }
47 }}
48
49 #endif