//Copyright (c) 2008-2016 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) #ifdef BOOST_QVM_TEST_SINGLE_HEADER # include BOOST_QVM_TEST_SINGLE_HEADER #else # include #endif template struct same_type; template struct same_type { }; template struct check { same_type::type,Result> a; same_type::type,Result> b; }; template struct m1; template struct m2; namespace boost { namespace qvm { template struct mat_traits< m1 > { typedef T scalar_type; static int const rows=R; static int const cols=C; }; template struct mat_traits< m2 > { typedef T scalar_type; static int const rows=R; static int const cols=C; }; template struct deduce_mat,R,C,S> { typedef m2 type; }; template struct deduce_mat2,m2,R,C,S> { typedef m2 type; }; } } int main() { same_type< boost::qvm::deduce_mat< m1 >::type, m1 >(); same_type< boost::qvm::deduce_mat< m1, 4, 4 >::type, boost::qvm::mat >(); check< m1, m1, 4, 2, m1 >(); check< m1, m1, 4, 4, boost::qvm::mat >(); same_type< boost::qvm::deduce_mat< m2 >::type, m2 >(); same_type< boost::qvm::deduce_mat< m2, 4, 4 >::type, m2 >(); check< m2, m2, 4, 2, m2 >(); check< m2, m2, 4, 4, m2 >(); }