]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/benchmark/fold_left/compile.hana.tuple.erb.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / benchmark / fold_left / compile.hana.tuple.erb.cpp
CommitLineData
b32b8144 1// Copyright Louis Dionne 2013-2017
7c673cae
FG
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
4
5#include <boost/hana/fold_left.hpp>
6#include <boost/hana/tuple.hpp>
7
8
9struct f {
10 template <typename State, typename X>
11 constexpr X operator()(State, X x) const { return x; }
12};
13
14struct state { };
15
16template <int i>
17struct x { };
18
19int main() {
20 constexpr auto tuple = boost::hana::make_tuple(
21 <%= (1..input_size).map { |n| "x<#{n}>{}" }.join(', ') %>
22 );
23 constexpr auto result = boost::hana::fold_left(tuple, state{}, f{});
24 (void)result;
25}