1 /*=============================================================================
2 Copyright (c) 2001-2006 Joel de Guzman
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 #if !defined(FUSION_BEGIN_IMPL_07162005_0115)
8 #define FUSION_BEGIN_IMPL_07162005_0115
10 #include <boost/fusion/iterator/equal_to.hpp>
11 #include <boost/mpl/if.hpp>
13 namespace boost
{ namespace fusion
15 struct joint_view_tag
;
17 template <typename First
, typename Last
, typename Concat
>
18 struct joint_view_iterator
;
22 template <typename Tag
>
26 struct begin_impl
<joint_view_tag
>
28 template <typename Sequence
>
31 typedef typename
Sequence::first_type first_type
;
32 typedef typename
Sequence::last_type last_type
;
33 typedef typename
Sequence::concat_type concat_type
;
34 typedef result_of::equal_to
<first_type
, last_type
> equal_to
;
40 , joint_view_iterator
<first_type
, last_type
, concat_type
>
45 call(Sequence
& s
, mpl::true_
)
51 call(Sequence
& s
, mpl::false_
)
53 return type(s
.first(), s
.concat());
59 return call(s
, equal_to());