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