From 0ff3dbba54e5b28826c59fd9523a4457c7944dbf Mon Sep 17 00:00:00 2001 From: Jiri Pittner Date: Fri, 8 Jul 2022 14:50:10 +0200 Subject: [PATCH] LA traits for Quaternion class --- quaternion.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/quaternion.h b/quaternion.h index 46a1fe3..08f80bc 100644 --- a/quaternion.h +++ b/quaternion.h @@ -30,8 +30,31 @@ #include #include -namespace LA_Quaternion { + +#ifndef AVOID_LA +#include "la.h" +#endif + + + +#ifndef AVOID_LA +namespace LA_Quaternion { +template +class Quaternion; //forward declaration +} + +template +class LA::LA_traits > { +public: + static bool is_plaindata() {return true;}; + static void copyonwrite(LA_Quaternion::Quaternion& x) {}; + typedef T normtype; +}; +#endif + + +namespace LA_Quaternion { template class Quaternion {