compile.hana.types.erb.cpp 630 B

1234567891011121314151617181920212223242526
  1. /*
  2. @copyright Louis Dionne 2015
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  5. */
  6. #include <boost/hana/experimental/types.hpp>
  7. #include <boost/hana/transform.hpp>
  8. #include <boost/hana/type.hpp>
  9. namespace hana = boost::hana;
  10. template <typename>
  11. struct f { struct type; };
  12. template <int> struct x;
  13. int main() {
  14. constexpr auto types = hana::experimental::types<
  15. <%= (1..input_size).map { |i| "x<#{i}>" }.join(', ') %>
  16. >{};
  17. constexpr auto result = hana::transform(types, hana::metafunction<f>);
  18. (void)result;
  19. }