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 #ifndef BOOST_HANA_EXAMPLE_CPPCON_2014_MATRIX_GROUP_HPP 6 #define BOOST_HANA_EXAMPLE_CPPCON_2014_MATRIX_GROUP_HPP 7 8 #include "matrix.hpp" 9 10 #include <boost/hana/concept/group.hpp> 11 12 #include <utility> 13 14 15 namespace boost { namespace hana { 16 template <unsigned R, unsigned C> 17 struct minus_impl<cppcon::Matrix<R, C>, cppcon::Matrix<R, C>> { 18 template <typename M1, typename M2> applyboost::hana::minus_impl19 static constexpr decltype(auto) apply(M1&& m1, M2&& m2) { 20 return element_wise(minus)( 21 std::forward<M1>(m1), 22 std::forward<M2>(m2) 23 ); 24 } 25 }; 26 }} 27 28 #endif // !BOOST_HANA_EXAMPLE_CPPCON_2014_MATRIX_GROUP_HPP 29