detail_tuple_slice_test.cpp 551 B

123456789101112131415161718192021
  1. // Copyright 2015-2017 Hans Dembinski
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt
  5. // or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #include <boost/core/lightweight_test.hpp>
  7. #include <boost/histogram/detail/tuple_slice.hpp>
  8. #include <tuple>
  9. #include "std_ostream.hpp"
  10. using namespace boost::histogram::detail;
  11. int main() {
  12. auto a = std::make_tuple(1, 2, 3, 4);
  13. const auto b = tuple_slice<1, 2>(a);
  14. BOOST_TEST_EQ(b, std::make_tuple(2, 3));
  15. return boost::report_errors();
  16. }