#ifndef UUID_EF9152E42E4711DFB699737156D89593\r
#define UUID_EF9152E42E4711DFB699737156D89593\r
\r
+#include <boost/qvm/quat_traits_defaults.hpp>\r
#include <boost/qvm/deduce_quat.hpp>\r
#include <boost/qvm/assert.hpp>\r
#include "test_qvm.hpp"\r
{\r
template <class Tag,class T>\r
struct\r
- quat_traits< test_qvm::quaternion<Tag,T> >\r
+ quat_traits< test_qvm::quaternion<Tag,T> >:\r
+ quat_traits_defaults<test_qvm::quaternion<Tag,T>,T>\r
{\r
- typedef T scalar_type;\r
- typedef test_qvm::quaternion<Tag,T> this_quaternion_type;\r
+ typedef quat_traits_defaults<test_qvm::quaternion<Tag,T>,T> base;\r
\r
template <int I>\r
static\r
- scalar_type &\r
- write_element( this_quaternion_type & m )\r
+ typename base::scalar_type &\r
+ write_element( typename base::quat_type & m )\r
{\r
BOOST_QVM_STATIC_ASSERT(I>=0);\r
BOOST_QVM_STATIC_ASSERT(I<4);\r
return m.a[I];\r
}\r
-\r
- template <int I>\r
- static\r
- scalar_type\r
- read_element( this_quaternion_type const & m )\r
- {\r
- BOOST_QVM_STATIC_ASSERT(I>=0);\r
- BOOST_QVM_STATIC_ASSERT(I<4);\r
- return m.a[I];\r
- }\r
-\r
- static\r
- inline\r
- scalar_type &\r
- write_element_idx( int i, this_quaternion_type & m )\r
- {\r
- BOOST_QVM_ASSERT(i>=0);\r
- BOOST_QVM_ASSERT(i<4);\r
- return m.a[i];\r
- }\r
-\r
- static\r
- inline\r
- scalar_type\r
- read_element_idx( int i, this_quaternion_type const & m )\r
- {\r
- BOOST_QVM_ASSERT(i>=0);\r
- BOOST_QVM_ASSERT(i<4);\r
- return m.a[i];\r
- }\r
};\r
\r
template <class Tag,class T>\r