]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/deduce_matrix_test.cpp
1 //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #include <boost/qvm/deduce_mat.hpp>
8 template <class T
,class U
>
17 template <class A
,class B
,int R
,int C
,class Result
>
21 same_type
<typename
boost::qvm::deduce_mat2
<A
,B
,R
,C
>::type
,Result
> a
;
22 same_type
<typename
boost::qvm::deduce_mat2
<B
,A
,R
,C
>::type
,Result
> b
;
25 template <class T
,int R
,int C
> struct m
;
33 template <class T
,int R
,int C
>
35 mat_traits
< m
<T
,R
,C
> >
37 typedef T scalar_type
;
38 static int const rows
=R
;
39 static int const cols
=C
;
47 same_type
< boost::qvm::deduce_mat
< m
<int,4,2> >::type
, m
<int,4,2> >();
48 same_type
< boost::qvm::deduce_mat
< m
<int,4,2>, 4, 4 >::type
, boost::qvm::mat
<int,4,4> >();
49 check
< m
<int,4,2>, m
<int,4,2>, 4, 2, m
<int,4,2> >();
50 check
< m
<int,4,2>, m
<float,4,2>, 4, 4, boost::qvm::mat
<float,4,4> >();