aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/vecmat.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/vecmat.h b/common/vecmat.h
index 5a61ad14..d301cc30 100644
--- a/common/vecmat.h
+++ b/common/vecmat.h
@@ -11,8 +11,9 @@
namespace alu {
-template<typename T, std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
+template<typename T>
class VectorR {
+ static_assert(std::is_floating_point<T>::value, "Must use floating-point types");
alignas(16) std::array<T,4> mVals;
public:
@@ -63,8 +64,9 @@ public:
};
using Vector = VectorR<float>;
-template<typename T, std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
+template<typename T>
class MatrixR {
+ static_assert(std::is_floating_point<T>::value, "Must use floating-point types");
alignas(16) std::array<T,16> mVals;
public: