#ifndef BOOST_QVM_DEDUCE_MAT_HPP_INCLUDED #define BOOST_QVM_DEDUCE_MAT_HPP_INCLUDED /// Copyright (c) 2008-2021 Emil Dotchevski and Reverge Studios, Inc. /// Distributed under the Boost Software License, Version 1.0. (See accompanying /// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include namespace boost { namespace qvm { template struct mat; namespace qvm_detail { template ::rows, int MC=mat_traits::cols, class MS=typename mat_traits::scalar_type> struct deduce_m_default { BOOST_QVM_STATIC_ASSERT(is_mat::value); typedef mat::scalar_type,R,C> type; }; template struct deduce_m_default { BOOST_QVM_STATIC_ASSERT(is_mat::value); typedef M type; }; } template ::rows,int C=mat_traits::cols,class S=typename mat_traits::scalar_type> struct deduce_mat { BOOST_QVM_STATIC_ASSERT(is_mat::value); typedef typename qvm_detail::deduce_m_default::type type; }; namespace qvm_detail { template ::value, bool IsScalarB=is_scalar::value> struct deduce_m2_default { typedef mat type; }; template struct deduce_m2_default { BOOST_QVM_STATIC_ASSERT(is_mat::value); typedef M type; }; template struct deduce_m2_default { BOOST_QVM_STATIC_ASSERT(is_mat::value); typedef typename deduce_mat::type type; }; template struct deduce_m2_default { BOOST_QVM_STATIC_ASSERT(is_mat::value); typedef typename deduce_mat::type type; }; } template ::type,typename scalar::type>::type> struct deduce_mat2 { BOOST_QVM_STATIC_ASSERT(is_mat::value || is_mat::value); typedef typename qvm_detail::deduce_m2_default::type type; }; } } #endif