//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_QVM_EF9152E42E4711DFB699737156D89593 #define BOOST_QVM_EF9152E42E4711DFB699737156D89593 #include #include #include #include "test_qvm.hpp" namespace test_qvm { template struct quaternion { T a[4]; mutable T b[4]; explicit quaternion( T start=T(0), T step=T(0) ) { for( int i=0; i!=4; ++i,start+=step ) a[i]=b[i]=start; } }; template void dump_ab( quaternion const & a, quaternion const & b ) { detail::dump_ab(a.a,b.a); } } namespace boost { namespace qvm { template struct quat_traits< test_qvm::quaternion >: quat_traits_defaults,T> { typedef quat_traits_defaults,T> base; template static typename base::scalar_type & write_element( typename base::quat_type & m ) { BOOST_QVM_STATIC_ASSERT(I>=0); BOOST_QVM_STATIC_ASSERT(I<4); return m.a[I]; } }; template struct deduce_quat2,test_qvm::quaternion > { typedef test_qvm::quaternion type; }; } } namespace { struct Q1; struct Q2; struct Q3; } #endif