2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-21 03:02:11 +00:00
Files
hana/benchmarks/partition/filter.erb.cpp

13 lines
404 B
C++

<%= render('_main.erb') {
<<-EOS
#include <boost/hana/detail/constexpr.hpp>
#include <boost/hana/list.hpp>
BOOST_HANA_CONSTEXPR_LAMBDA auto partition = [](auto pred, auto xs) {
auto not_pred = [=](auto x) { return !pred(x); };
return boost::hana::list(
boost::hana::filter(pred, xs),
boost::hana::filter(not_pred, xs)
);
};
EOS
} %>