compile.mpl.vector.erb.cpp 572 B

12345678910111213141516171819202122
  1. // Copyright Louis Dionne 2013-2017
  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. #include <boost/mpl/push_back.hpp>
  5. #include <boost/mpl/quote.hpp>
  6. #include <boost/mpl/transform.hpp>
  7. #include <boost/mpl/vector.hpp>
  8. template <typename X>
  9. struct f { using type = X; };
  10. template <int i>
  11. struct t { };
  12. using vector = <%= mpl_vector((1..input_size).to_a.map { |n| "t<#{n}>" }) %>;
  13. using result = boost::mpl::transform<vector, boost::mpl::quote1<f>>::type;
  14. int main() { }