]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/qvm/test/swizzle4_test2.cpp
update sources to v12.2.4
[ceph.git] / ceph / src / boost / libs / qvm / test / swizzle4_test2.cpp
CommitLineData
3a9019d9
FG
1//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.\r
2\r
3//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
4//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
5\r
6#include <boost/qvm/vec_traits.hpp>\r
7#include <boost/qvm/swizzle4.hpp>\r
8#include <boost/detail/lightweight_test.hpp>\r
9\r
10template <int D> struct my_vec { };\r
11int called=0;\r
12\r
13namespace\r
14boost\r
15 {\r
16 namespace\r
17 qvm\r
18 {\r
19 void\r
20 XXXX(...)\r
21 {\r
22 BOOST_TEST(0);\r
23 }\r
24 void\r
25 XXXY(...)\r
26 {\r
27 ++called;\r
28 }\r
29 template <int D>\r
30 struct\r
31 vec_traits< my_vec<D> >\r
32 {\r
33 typedef int scalar_type;\r
34 static int const dim=D;\r
35 template <int I> static int read_element( my_vec<D> const & );\r
36 template <int I> static int & write_element( my_vec<D> & );\r
37 };\r
38 }\r
39 }\r
40\r
41int\r
42main()\r
43 {\r
44 using namespace boost::qvm;\r
45 XXXX(my_vec<1>());\r
46 XXXY(my_vec<1>());\r
47 BOOST_TEST(called==1);\r
48 return boost::report_errors();\r
49 }\r