compile.meta.list.erb.cpp 477 B

123456789101112131415161718192021
  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 <meta/meta.hpp>
  5. struct is_last {
  6. template <typename N>
  7. using apply = meta::bool_<N::value == <%= input_size %>>;
  8. };
  9. using list = meta::list<
  10. <%= (1..input_size).map { |i| "meta::int_<#{i}>" }.join(', ') %>
  11. >;
  12. using result = meta::find_if<list, is_last>;
  13. int main() {
  14. }