]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/benchmark/transform/compile.hana.tuple.erb.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / hana / benchmark / transform / compile.hana.tuple.erb.cpp
1 // Copyright Louis Dionne 2013-2016
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/transform.hpp>
6 #include <boost/hana/tuple.hpp>
7
8
9 struct f {
10 template <typename X>
11 constexpr X operator()(X x) const { return x; }
12 };
13
14 template <int i>
15 struct x { };
16
17 int main() {
18 constexpr auto tuple = boost::hana::make_tuple(
19 <%= (1..input_size).map { |n| "x<#{n}>{}" }.join(', ') %>
20 );
21 constexpr auto result = boost::hana::transform(tuple, f{});
22 (void)result;
23 }