mirror of
https://github.com/boostorg/hana.git
synced 2026-02-23 15:52:11 +00:00
21 lines
516 B
C++
21 lines
516 B
C++
<% render(instance) %>
|
|
<%= includes((0..x).size) %>
|
|
|
|
#include <boost/hana/detail/constexpr.hpp>
|
|
#include <boost/hana/foldable/foldable.hpp>
|
|
#include <boost/hana/integral.hpp>
|
|
|
|
|
|
BOOST_HANA_CONSTEXPR_LAMBDA auto is_odd = [](auto x) {
|
|
return x % boost::hana::int_<2> != boost::hana::int_<0>;
|
|
};
|
|
|
|
int main() {
|
|
auto go = boost::hana::count(is_odd,
|
|
<%= list(
|
|
(0..x).map { |i| "decltype(boost::hana::int_<#{i}>)" },
|
|
(0..x).map { |i| "boost::hana::int_<#{i}>" }
|
|
) %>
|
|
);
|
|
}
|