]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/cmp_vv_test.cpp
update sources to v12.2.4
[ceph.git] / ceph / src / boost / libs / qvm / test / cmp_vv_test.cpp
1 //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
2
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)
5
6 #include <boost/qvm/vec_operations.hpp>
7 #include <boost/qvm/vec_traits_array.hpp>
8 #include "test_qvm_vector.hpp"
9 #include "gold.hpp"
10 #include <functional>
11
12 namespace
13 {
14 template <int Dim>
15 void
16 test()
17 {
18 using namespace boost::qvm::sfinae;
19 test_qvm::vector<V1,Dim> const x(42,1);
20 for( int i=0; i!=Dim; ++i )
21 {
22 {
23 test_qvm::vector<V1,Dim> y(x);
24 BOOST_TEST(cmp(x,y,std::equal_to<float>()));
25 y.a[i]=0;
26 BOOST_TEST(!cmp(x,y,std::equal_to<float>()));
27 }
28 }
29 }
30 }
31
32 int
33 main()
34 {
35 test<2>();
36 test<3>();
37 test<4>();
38 test<5>();
39 return boost::report_errors();
40 }