• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/equal.hpp>
7 #include <boost/hana/not.hpp>
8 
9 #include "matrix/comparable.hpp"
10 namespace hana = boost::hana;
11 using namespace cppcon;
12 
13 
main()14 int main() {
15     BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
16         matrix(row(1, 2)),
17         matrix(row(1, 2))
18     ));
19     BOOST_HANA_CONSTEXPR_CHECK(hana::not_(hana::equal(
20         matrix(row(1, 2)),
21         matrix(row(1, 5))
22     )));
23 
24     BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
25         matrix(row(1, 2),
26                row(3, 4)),
27         matrix(row(1, 2),
28                row(3, 4))
29     ));
30     BOOST_HANA_CONSTEXPR_CHECK(hana::not_(hana::equal(
31         matrix(row(1, 2),
32                row(3, 4)),
33         matrix(row(1, 2),
34                row(0, 4))
35     )));
36     BOOST_HANA_CONSTEXPR_CHECK(hana::not_(hana::equal(
37         matrix(row(1, 2),
38                row(3, 4)),
39         matrix(row(0, 2),
40                row(3, 4))
41     )));
42 
43     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal(
44         matrix(row(1),
45                row(2)),
46         matrix(row(3, 4),
47                row(5, 6))
48     )));
49     BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal(
50         matrix(row(1),
51                row(2)),
52         matrix(row(3, 4))
53     )));
54 }
55 
56