X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Fhana%2Fexample%2Fstruct%2Fsearchable.cpp;h=aae5dbfa0ed3b811a23868d5713bb9add9ea6af9;hb=b32b81446b3b05102be0267e79203f59329c1d97;hp=ce25f182b89a0f638c07afefb025362eabfc00c7;hpb=215dd7151453fae88e6f968c975b6ce309d42dcf;p=ceph.git diff --git a/ceph/src/boost/libs/hana/example/struct/searchable.cpp b/ceph/src/boost/libs/hana/example/struct/searchable.cpp index ce25f182b..aae5dbfa0 100644 --- a/ceph/src/boost/libs/hana/example/struct/searchable.cpp +++ b/ceph/src/boost/libs/hana/example/struct/searchable.cpp @@ -1,12 +1,15 @@ -// Copyright Louis Dionne 2013-2016 +// Copyright Louis Dionne 2013-2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) +#include +#include #include #include #include #include #include +#include #include #include @@ -30,4 +33,14 @@ int main() { BOOST_HANA_CONSTANT_CHECK( hana::find(john, BOOST_HANA_STRING("foobar")) == hana::nothing ); + + + BOOST_HANA_RUNTIME_CHECK( + hana::all_of(hana::accessors(), [&](auto a) { + return hana::second(a)(john) == hana::second(a)(john); + }) + ); + + // the above is equivalent to: + BOOST_HANA_RUNTIME_CHECK(hana::equal(john, john)); }