2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-23 15:52:11 +00:00
Files
hana/benchmark/list/foldable/foldl1.cpp
2014-07-16 16:26:23 -04:00

25 lines
482 B
C++

<% render(instance) %>
<%= includes(x) %>
#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 {}; }
};
template <int> struct x { };
int main() {
auto go = boost::hana::foldl1(f{},
<%= list(
(1..x+1).map { |i| "x<#{i}>" },
(1..x+1).map { |i| "x<#{i}>{}" }
) %>
);
}