]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/string/find_if.cpp
05d5e98b94781e2d3c168153780e150efd21636b
1 // Copyright Louis Dionne 2013-2017
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/bool.hpp>
7 #include <boost/hana/equal.hpp>
8 #include <boost/hana/find_if.hpp>
9 #include <boost/hana/functional/always.hpp>
10 #include <boost/hana/integral_constant.hpp>
11 #include <boost/hana/optional.hpp>
12 #include <boost/hana/string.hpp>
13 namespace hana
= boost::hana
;
17 BOOST_HANA_CONSTANT_CHECK(hana::equal(
18 hana::find_if(BOOST_HANA_STRING(""), hana::always(hana::true_c
)),
22 BOOST_HANA_CONSTANT_CHECK(hana::equal(
23 hana::find_if(BOOST_HANA_STRING("abcd"), hana::equal
.to(hana::char_c
<'a'>)),
24 hana::just(hana::char_c
<'a'>)
27 BOOST_HANA_CONSTANT_CHECK(hana::equal(
28 hana::find_if(BOOST_HANA_STRING("abcd"), hana::equal
.to(hana::char_c
<'c'>)),
29 hana::just(hana::char_c
<'c'>)
32 BOOST_HANA_CONSTANT_CHECK(hana::equal(
33 hana::find_if(BOOST_HANA_STRING("abcd"), hana::equal
.to(hana::char_c
<'d'>)),
34 hana::just(hana::char_c
<'d'>)