1 | /*=============================================================================
|
---|
2 | Copyright (c) 2003 Joel de Guzman
|
---|
3 | Copyright (c) 2005 Eric Niebler
|
---|
4 |
|
---|
5 | Use, modification and distribution is subject to the Boost Software
|
---|
6 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
---|
7 | http://www.boost.org/LICENSE_1_0.txt)
|
---|
8 | ==============================================================================*/
|
---|
9 | #if !defined(FUSION_ITERATOR_DETAIL_CONS_ITERATOR_VALUE_TRAITS_HPP)
|
---|
10 | #define FUSION_ITERATOR_DETAIL_CONS_ITERATOR_VALUE_TRAITS_HPP
|
---|
11 |
|
---|
12 | #include <boost/spirit/fusion/detail/config.hpp>
|
---|
13 |
|
---|
14 | namespace boost { namespace fusion
|
---|
15 | {
|
---|
16 | struct cons_iterator_tag;
|
---|
17 |
|
---|
18 | namespace cons_detail
|
---|
19 | {
|
---|
20 | template <typename Iterator>
|
---|
21 | struct value_traits_impl
|
---|
22 | {
|
---|
23 | typedef typename Iterator::cons_type cons_type;
|
---|
24 | typedef typename cons_type::car_type type;
|
---|
25 | };
|
---|
26 | }
|
---|
27 |
|
---|
28 | namespace meta
|
---|
29 | {
|
---|
30 | template <typename Tag>
|
---|
31 | struct value_impl;
|
---|
32 |
|
---|
33 | template <>
|
---|
34 | struct value_impl<cons_iterator_tag>
|
---|
35 | {
|
---|
36 | template <typename Iterator>
|
---|
37 | struct apply : cons_detail::value_traits_impl<Iterator> {};
|
---|
38 | };
|
---|
39 | }
|
---|
40 |
|
---|
41 | }}
|
---|
42 |
|
---|
43 | #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
---|
44 |
|
---|
45 | namespace boost { namespace mpl
|
---|
46 | {
|
---|
47 | template <typename Iterator>
|
---|
48 | struct deref;
|
---|
49 |
|
---|
50 | template <typename Cons>
|
---|
51 | struct deref<fusion::cons_iterator<Cons> >
|
---|
52 | : fusion::cons_detail::value_traits_impl<fusion::cons_iterator<Cons> >
|
---|
53 | {
|
---|
54 | };
|
---|
55 | }}
|
---|
56 |
|
---|
57 | #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
---|
58 |
|
---|
59 | #endif
|
---|
60 |
|
---|
61 |
|
---|