compile.mpl11.list.erb.cpp 566 B

1234567891011121314151617181920212223242526
  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/mpl11/list.hpp>
  5. struct f {
  6. using type = f;
  7. template <typename, typename>
  8. struct apply { struct type; };
  9. };
  10. template <int> struct x { struct type; };
  11. struct state { struct type; };
  12. using list = boost::mpl11::list<
  13. <%= (1..input_size).map { |i| "x<#{i}>" }.join(', ') %>
  14. >;
  15. using result = boost::mpl11::foldl<f, state, list>::type;
  16. int main() {
  17. }