]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hof/test/issue8.cpp
1 /*=============================================================================
2 Copyright (c) 2017 Paul Fultz II
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 ==============================================================================*/
10 #include <boost/hof/pipable.hpp>
11 #include <boost/hof/placeholders.hpp>
17 template<class Input
, class P
>
18 Input
operator()(Input input
, P pred
) const
20 Input
output(input
.size());
34 static constexpr boost::hof::pipable_adaptor
<filter_fn
> filter
= {};
38 std::vector
<int> data
;
43 std::vector
<int> r1
= data
| filter(boost::hof::_1
> 1);
44 BOOST_HOF_TEST_CHECK(r1
.size() == 4);
46 std::vector
<int> r2
= filter(data
, boost::hof::_1
> 1);
47 BOOST_HOF_TEST_CHECK(r2
.size() == 4);