// Copyright Louis Dionne 2013-2016 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #ifndef BOOST_HANA_EXAMPLE_CPPCON_2014_MATRIX_COMPARABLE_HPP #define BOOST_HANA_EXAMPLE_CPPCON_2014_MATRIX_COMPARABLE_HPP #include "matrix.hpp" #include #include #include #include #include namespace boost { namespace hana { template struct equal_impl, cppcon::Matrix> { template static constexpr auto apply(M1 const& m1, M2 const& m2) { return eval_if(bool_c, [&](auto _) { return all(zip_with(_(equal), cppcon::rows(m1), cppcon::rows(m2))); }, [] { return false_c; } ); } }; }} #endif // !BOOST_HANA_EXAMPLE_CPPCON_2014_MATRIX_COMPARABLE_HPP