]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/example/ext/std/array/orderable.cpp
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)
5 #include <boost/hana/ext/std/array.hpp>
6 #include <boost/hana/less.hpp>
9 namespace hana
= boost::hana
;
12 constexpr std::array
<int, 4> evens
= {{2, 4, 6, 8}};
13 constexpr std::array
<int, 4> odds
= {{1, 3, 5, 7}};
15 constexpr std::array
<int, 5> up_to_5
= {{1, 2, 3, 4, 5}};
17 // arrays with same length
18 static_assert(hana::less(odds
, evens
), "");
20 // arrays with different lengths
21 static_assert(hana::less(up_to_5
, odds
), "");