]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/fusion/algorithm/iteration/for_each.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / fusion / algorithm / iteration / for_each.hpp
CommitLineData
7c673cae
FG
1/*=============================================================================
2 Copyright (c) 2001-2007 Joel de Guzman
3 Copyright (c) 2007 Dan Marsden
92f5a8d4 4 Copyright (c) 2018 Kohei Takahashi
7c673cae
FG
5
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8==============================================================================*/
9#if !defined(BOOST_FUSION_FOR_EACH_20070527_0943)
10#define BOOST_FUSION_FOR_EACH_20070527_0943
11
12#include <boost/fusion/support/config.hpp>
13#include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
14#include <boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp>
15#include <boost/fusion/support/is_segmented.hpp>
16#include <boost/fusion/support/is_sequence.hpp>
92f5a8d4 17#include <boost/core/enable_if.hpp>
7c673cae
FG
18
19namespace boost { namespace fusion
20{
21 namespace result_of
22 {
23 template <typename Sequence, typename F>
24 struct for_each
25 {
26 typedef void type;
27 };
28 }
29
30 template <typename Sequence, typename F>
31 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
92f5a8d4
TL
32 inline typename enable_if<traits::is_sequence<Sequence> >::type
33 for_each(Sequence& seq, F f)
7c673cae
FG
34 {
35 detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
36 }
37
38 template <typename Sequence, typename F>
39 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
92f5a8d4
TL
40 inline typename enable_if<traits::is_sequence<Sequence> >::type
41 for_each(Sequence const& seq, F f)
7c673cae
FG
42 {
43 detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
44 }
45}}
46
47#endif