]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/zero_vec_test.cpp
5fadd057dd425d4a67f0b5bf8525d33e386dfd81
1 // Copyright 2008-2022 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 #ifdef BOOST_QVM_TEST_SINGLE_HEADER
7 # include BOOST_QVM_TEST_SINGLE_HEADER
9 # include <boost/qvm/vec_operations.hpp>
10 # include <boost/qvm/vec.hpp>
13 #include "test_qvm_vector.hpp"
17 template <class T
,class U
>
26 template <class T
,class U
>
28 check_deduction( T
const &, U
const & )
30 same_type
<T
,typename
boost::qvm::deduce_vec
<U
>::type
>();
37 using namespace boost::qvm
;
38 test_qvm::vector
<V1
,Dim
> v1
=zero_vec
<float,Dim
>();
39 for( int i
=0; i
!=Dim
; ++i
)
41 test_qvm::vector
<V2
,Dim
> v2(42,1);
43 for( int i
=0; i
!=Dim
; ++i
)
45 check_deduction(vec
<float,Dim
>(),zero_vec
<float,Dim
>());
46 check_deduction(vec
<int,Dim
>(),zero_vec
<int,Dim
>());
57 return boost::report_errors();