1 /*=============================================================================
2 Copyright (c) 2001-2006 Joel de Guzman
3 Copyright (c) 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(FUSION_CONVERT_20061213_2207)
9 #define FUSION_CONVERT_20061213_2207
11 #include <boost/fusion/container/deque/detail/as_deque.hpp>
12 #include <boost/fusion/container/deque/detail/convert_impl.hpp>
13 #include <boost/fusion/container/deque/deque.hpp>
14 #include <boost/fusion/sequence/intrinsic/begin.hpp>
15 #include <boost/fusion/sequence/intrinsic/size.hpp>
17 namespace boost
{ namespace fusion
21 template <typename Sequence
>
24 typedef typename
detail::as_deque
<result_of::size
<Sequence
>::value
> gen
;
25 typedef typename
gen::
26 template apply
<typename
result_of::begin
<Sequence
>::type
>::type
31 template <typename Sequence
>
32 inline typename
result_of::as_deque
<Sequence
>::type
33 as_deque(Sequence
& seq
)
35 typedef typename
result_of::as_deque
<Sequence
>::gen gen
;
36 return gen::call(fusion::begin(seq
));
39 template <typename Sequence
>
40 inline typename
result_of::as_deque
<Sequence
const>::type
41 as_deque(Sequence
const& seq
)
43 typedef typename
result_of::as_deque
<Sequence
const>::gen gen
;
44 return gen::call(fusion::begin(seq
));