quaternion: explicitly instantiate the sanity check

This commit is contained in:
Danny Robson 2020-08-21 09:33:46 +10:00
parent 34270e5b8f
commit e0acc9288e

View File

@ -356,17 +356,19 @@ cruft::operator<< (std::ostream &os, const quaternion<T> q)
///////////////////////////////////////////////////////////////////////////////
namespace cruft::debug {
template <typename T>
struct validator<quaternion<T>> {
static constexpr
bool
is_valid (const quaternion<T> &q)
{
return is_normalised (q);
}
};
}
template <typename ValueT>
struct cruft::debug::validator<quaternion<ValueT>> {
static constexpr
bool
is_valid (const quaternion<ValueT> &q)
{
return is_normalised (q);
}
};
//-----------------------------------------------------------------------------
template struct cruft::debug::validator<::cruft::quaternion<float>>;
///////////////////////////////////////////////////////////////////////////////