quat_traits.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
  2. //Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef UUID_EF321CBE275911E084A4550FDFD72085
  5. #define UUID_EF321CBE275911E084A4550FDFD72085
  6. namespace
  7. boost
  8. {
  9. namespace
  10. qvm
  11. {
  12. template <class Q>
  13. struct
  14. quat_traits
  15. {
  16. typedef void scalar_type;
  17. };
  18. namespace
  19. is_quaternion_detail
  20. {
  21. template <class>
  22. struct
  23. is_void
  24. {
  25. static bool const value=false;
  26. };
  27. template <>
  28. struct
  29. is_void<void>
  30. {
  31. static bool const value=true;
  32. };
  33. }
  34. template <class T>
  35. struct
  36. is_quat
  37. {
  38. static bool const value=!is_quaternion_detail::is_void<typename quat_traits<T>::scalar_type>::value;
  39. };
  40. }
  41. }
  42. #endif