]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/zero_vec_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/vec_operations.hpp>
7 #include <boost/qvm/vec.hpp>
8 #include "test_qvm_vector.hpp"
12 template <class T
,class U
>
21 template <class T
,class U
>
23 check_deduction( T
const &, U
const & )
25 same_type
<T
,typename
boost::qvm::deduce_vec
<U
>::type
>();
32 using namespace boost::qvm
;
33 test_qvm::vector
<V1
,Dim
> v1
=zero_vec
<float,Dim
>();
34 for( int i
=0; i
!=Dim
; ++i
)
36 test_qvm::vector
<V2
,Dim
> v2(42,1);
38 for( int i
=0; i
!=Dim
; ++i
)
40 check_deduction(vec
<float,Dim
>(),zero_vec
<float,Dim
>());
41 check_deduction(vec
<int,Dim
>(),zero_vec
<int,Dim
>());
52 return boost::report_errors();