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/assert.hpp>
6 #include <boost/hana/equal.hpp>
7 #include <boost/hana/mult.hpp>
8 #include <boost/hana/one.hpp>
10 #include "matrix/comparable.hpp"
11 #include "matrix/ring.hpp"
12 namespace hana
= boost::hana
;
13 using namespace cppcon
;
19 BOOST_HANA_CONSTEXPR_LAMBDA
auto a
= matrix(
24 BOOST_HANA_CONSTEXPR_LAMBDA
auto b
= matrix(
30 BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
33 row(1*1 + 2*3 + 5*3, 1*2 + 2*4 + 3*6),
34 row(4*1 + 3*5 + 5*6, 4*2 + 5*4 + 6*6)
41 BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
42 hana::one
<Matrix
<1, 1>>(),
48 BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
49 hana::one
<Matrix
<2, 2>>(),
56 BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
57 hana::one
<Matrix
<3, 3>>(),
65 BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
66 hana::one
<Matrix
<4, 4>>(),
75 BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
76 hana::one
<Matrix
<4, 5>>(),
85 BOOST_HANA_CONSTEXPR_CHECK(hana::equal(
86 hana::one
<Matrix
<5, 4>>(),