diff options
author | Chris Robinson <[email protected]> | 2020-12-15 23:47:47 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-15 23:47:47 -0800 |
commit | f38919eeccf4d484bba756af17c45bc84c4fb2e6 (patch) | |
tree | 8f1444f08e016330ddb38591cf0c66ad4298145b /common | |
parent | 5b51a58ff28f6772c75a9b1ebfadfc6e00c55845 (diff) |
Avoid using a hidden unnamed template parameter
Diffstat (limited to 'common')
-rw-r--r-- | common/vecmat.h | 6 |
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: |