source: NonGTP/Boost/boost/spirit/fusion/algorithm/detail/for_each.ipp @ 857

Revision 857, 1.2 KB checked in by igarcia, 18 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_ALGORITHM_DETAIL_FOR_EACH_IPP)
10#define FUSION_ALGORITHM_DETAIL_FOR_EACH_IPP
11
12#include <boost/mpl/bool.hpp>
13#include <boost/spirit/fusion/iterator/equal_to.hpp>
14#include <boost/spirit/fusion/iterator/next.hpp>
15#include <boost/spirit/fusion/iterator/deref.hpp>
16
17namespace boost { namespace fusion { namespace detail
18{
19    template <typename First, typename Last, typename F>
20    inline void
21    for_each(First const&, Last const&, F const&, mpl::true_)
22    {
23    }
24
25    template <typename First, typename Last, typename F>
26    inline void
27    for_each(First const& first, Last const& last, F const& f, mpl::false_)
28    {
29        f(*first);
30        detail::for_each(fusion::next(first), last, f
31            , meta::equal_to<BOOST_DEDUCED_TYPENAME meta::next<First>::type, Last>());
32    }
33}}}
34
35#endif
36
Note: See TracBrowser for help on using the repository browser.