2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-23 15:52:11 +00:00
Files
hana/test/integral/comparable/laws.cpp
2014-07-16 17:12:19 -04:00

32 lines
751 B
C++

/*
@copyright Louis Dionne 2014
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include <boost/hana/integral.hpp>
#include <boost/hana/comparable/laws.hpp>
#include <boost/hana/detail/static_assert.hpp>
#include <boost/hana/list/instance.hpp>
using namespace boost::hana;
template <typename T, typename U>
void test() {
BOOST_HANA_STATIC_ASSERT(
Comparable::laws::check(
list(
integral<T, 0>, integral<U, 0>,
integral<T, 1>, integral<U, 1>,
integral<T, 2>, integral<U, 2>
)
)
);
}
int main() {
test<int, int>();
test<int, unsigned long long>();
}