move.hana.tuple.erb.cpp 734 B

123456789101112131415161718192021222324252627
  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/hana/reverse.hpp>
  5. #include <boost/hana/tuple.hpp>
  6. #include "measure.hpp"
  7. #include <cstdlib>
  8. #include <string>
  9. #include <utility>
  10. namespace hana = boost::hana;
  11. int main () {
  12. std::string s(1000, 'x');
  13. hana::benchmark::measure([&] {
  14. for (int iteration = 0; iteration < 1 << 5; ++iteration) {
  15. auto values = hana::make_tuple(
  16. <%= input_size.times.map { 's' }.join(', ') %>
  17. );
  18. auto result = hana::reverse(std::move(values));
  19. (void)result;
  20. }
  21. });
  22. }