orderable.cpp 717 B

1234567891011121314151617181920212223242526272829
  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/ext/std/array.hpp>
  5. #include <boost/hana/tuple.hpp>
  6. #include <laws/orderable.hpp>
  7. #include <array>
  8. namespace hana = boost::hana;
  9. template <int ...i>
  10. constexpr auto array() { return std::array<int, sizeof...(i)>{{i...}}; }
  11. int main() {
  12. auto int_arrays = hana::make_tuple(
  13. array<>()
  14. , array<0>()
  15. , array<0, 1>()
  16. , array<0, 1, 2>()
  17. , array<0, 1, 2, 3>()
  18. , array<0, 1, 2, 3, 4>()
  19. );
  20. hana::test::TestOrderable<hana::ext::std::array_tag>{int_arrays};
  21. }