fix doc example typo
[boost.git] / boost / fusion / container / deque / detail / end_impl.hpp
blob96a1b17da6d4cc0398c6c76ec70fc6253d3a3803
1 /*=============================================================================
2 Copyright (c) 2001-2006 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(BOOST_FUSION_DEQUE_END_IMPL_09122006_2034)
9 #define BOOST_FUSION_DEQUE_END_IMPL_09122006_2034
11 #include <boost/fusion/container/deque/deque_iterator.hpp>
13 #include <boost/mpl/equal_to.hpp>
14 #include <boost/mpl/if.hpp>
16 namespace boost { namespace fusion {
18 struct deque_tag;
20 namespace extension
22 template<typename T>
23 struct end_impl;
25 template<>
26 struct end_impl<deque_tag>
28 template<typename Sequence>
29 struct apply
31 typedef typename mpl::if_<
32 mpl::equal_to<typename Sequence::next_down, typename Sequence::next_up>,
33 deque_iterator<Sequence, 0>,
34 deque_iterator<
35 Sequence, Sequence::next_up::value> >::type type;
37 static type call(Sequence& seq)
39 return type(seq);
46 #endif