2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-24 04:02:12 +00:00
Files
hana/benchmark/list/foldable/foldl.cpp
2014-07-20 13:04:59 -04:00

26 lines
506 B
C++

<% render(instance) %>
<%= includes((0..x).size) %>
#include <boost/hana/foldable/foldable.hpp>
template <typename ...>
struct result { };
struct f {
template <typename State, typename X>
constexpr result<State, X> operator()(State, X) const { return {}; }
};
struct state { };
template <int> struct x { };
int main() {
auto go = boost::hana::foldl(f{}, state{},
<%= list(
(0..x).map { |i| "x<#{i}>" },
(0..x).map { |i| "x<#{i}>{}" }
) %>
);
}