source: NonGTP/Boost/boost/spirit/fusion/iterator/detail/adapt_deref_traits.hpp @ 857

Revision 857, 1.3 KB checked in by igarcia, 19 years ago (diff)
Line 
1/*=============================================================================
2    Copyright (c) 2003 Joel de Guzman
3    Copyright (c) 2004 Peder Holt
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_ADAPT_DEREF_TRAITS_HPP)
10#define FUSION_ADAPT_DEREF_TRAITS_HPP
11
12#include <boost/spirit/fusion/iterator/deref.hpp>
13
14namespace boost { namespace fusion { namespace detail
15{
16    namespace adapt_deref_detail {
17        template<typename Iterator>
18        struct deref_traits_impl
19        {
20            typedef typename
21                meta::deref<typename Iterator::first_type>::type
22            type;
23
24            static type
25            call(Iterator const& i);
26        };       
27
28        template<typename Iterator>
29        typename deref_traits_impl<Iterator>::type
30        deref_traits_impl<Iterator>::call(Iterator const& i)
31        {
32            return *i.first;
33        }
34    }
35    struct adapt_deref_traits {
36        template<typename Iterator>
37        struct apply : adapt_deref_detail::deref_traits_impl<Iterator>
38        {};
39    };
40
41}}}
42
43#endif
44
45
Note: See TracBrowser for help on using the repository browser.