compile.mpl.vector.erb.cpp 604 B

123456789101112131415161718192021222324
  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/fold.hpp>
  5. #include <boost/mpl/push_back.hpp>
  6. #include <boost/mpl/quote.hpp>
  7. #include <boost/mpl/vector.hpp>
  8. template <typename State, typename X>
  9. struct f { using type = X; };
  10. struct state { };
  11. template <int i>
  12. struct t { };
  13. using vector = <%= mpl_vector((1..input_size).to_a.map { |n| "t<#{n}>" }) %>;
  14. using result = boost::mpl::fold<vector, state, boost::mpl::quote2<f>>::type;
  15. int main() { }