]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/qvm/deduce_quat.hpp
Add patch for failing prerm scripts
[ceph.git] / ceph / src / boost / boost / qvm / deduce_quat.hpp
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 #ifndef UUID_435FA7E8196311E0A176DE6BDFD72085
7 #define UUID_435FA7E8196311E0A176DE6BDFD72085
8
9 #include <boost/qvm/deduce_scalar.hpp>
10 #include <boost/qvm/quat_traits.hpp>
11 #include <boost/qvm/static_assert.hpp>
12
13 namespace
14 boost
15 {
16 namespace
17 qvm
18 {
19 template <class T>
20 struct quat;
21
22 template <class Q>
23 struct
24 deduce_quat
25 {
26 BOOST_QVM_STATIC_ASSERT(is_quat<Q>::value);
27 typedef Q type;
28 };
29
30 namespace
31 qvm_detail
32 {
33 template <class A,class B,
34 bool QA=is_quat<A>::value,
35 bool QB=is_quat<B>::value>
36 struct
37 deduce_quat2_default
38 {
39 typedef quat<
40 typename deduce_scalar<
41 typename scalar<A>::type,
42 typename scalar<B>::type>::type> type;
43 };
44
45 template <class Q>
46 struct
47 deduce_quat2_default<Q,Q,true,true>
48 {
49 typedef Q type;
50 };
51 }
52
53 template <class A,class B>
54 struct
55 deduce_quat2
56 {
57 BOOST_QVM_STATIC_ASSERT(is_quat<A>::value || is_quat<B>::value);
58 typedef typename qvm_detail::deduce_quat2_default<A,B>::type type;
59 };
60 }
61 }
62
63 #endif