2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-21 03:02:11 +00:00
Files
hana/benchmark/techniques/foldl/main.cpp
2014-07-09 15:36:36 -04:00

19 lines
368 B
C++

template <typename ...>
struct result { };
constexpr struct {
template <typename State, typename X>
constexpr result<State, X> operator()(State, X) const { return {}; }
} f{};
constexpr struct { } state{};
template <int> struct x { };
int main() {
auto go = foldl(
<%= (['f', 'state'] + (0...x).map { |n| "x<#{n}>{}" }).join(', ') %>
);
}