1// Copyright Louis Dionne 2013-2022
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
5#include <boost/hana/ext/std/array.hpp>
6#include <boost/hana/less.hpp>
7
8#include <array>
9namespace hana = boost::hana;
10
11
12constexpr std::array<int, 4> evens = {._M_elems: {2, 4, 6, 8}};
13constexpr std::array<int, 4> odds = {._M_elems: {1, 3, 5, 7}};
14
15constexpr std::array<int, 5> up_to_5 = {._M_elems: {1, 2, 3, 4, 5}};
16
17// arrays with same length
18static_assert(hana::less(odds, evens), "");
19
20// arrays with different lengths
21static_assert(hana::less(up_to_5, odds), "");
22
23int main() { }
24

source code of boost/libs/hana/example/ext/std/array/orderable.cpp