]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/fusion/algorithm/transformation/flatten.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / fusion / algorithm / transformation / flatten.hpp
1 /*==============================================================================
2 Copyright (c) 2013 Jamboree
3
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 #ifndef BOOST_FUSION_ALGORITHM_FLATTEN_HPP_INCLUDED
8 #define BOOST_FUSION_ALGORITHM_FLATTEN_HPP_INCLUDED
9
10
11 #include <boost/fusion/view/flatten_view.hpp>
12 #include <boost/fusion/support/is_sequence.hpp>
13 #include <boost/utility/enable_if.hpp>
14
15
16 namespace boost { namespace fusion { namespace result_of
17 {
18 template<typename Sequence>
19 struct flatten
20 {
21 typedef flatten_view<Sequence> type;
22 };
23 }}}
24
25 namespace boost { namespace fusion
26 {
27 template <typename Sequence>
28 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
29 inline typename result_of::flatten<Sequence>::type
30 flatten(Sequence& view)
31 {
32 return flatten_view<Sequence>(view);
33 }
34
35 template <typename Sequence>
36 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
37 inline typename result_of::flatten<Sequence const>::type
38 flatten(Sequence const& view)
39 {
40 return flatten_view<Sequence const>(view);
41 }
42 }}
43
44
45 #endif
46