Skip to content
Snippets Groups Projects
Commit cde845c0 authored by Max Kahnt's avatar Max Kahnt
Browse files

Add decay to compile-time classifiers.

parent 0d9b151f
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !5. Comments created here will be created in the context of that merge request.
...@@ -17,22 +17,22 @@ namespace MatrixVector { ...@@ -17,22 +17,22 @@ namespace MatrixVector {
// convenience compile-time functions to classify types // convenience compile-time functions to classify types
template <class T> template <class T>
constexpr auto isNumber() { constexpr auto isNumber() {
return Std::bool_constant<IsNumber<T>::value>(); return Std::bool_constant<IsNumber<std::decay_t<T>>::value>();
} }
template <class T> template <class T>
constexpr auto isScalar() { constexpr auto isScalar() {
return Std::bool_constant<Traits::ScalarTraits<T>::isScalar>(); return Std::bool_constant<Traits::ScalarTraits<std::decay_t<T>>::isScalar>();
} }
template <class T> template <class T>
constexpr auto isVector() { constexpr auto isVector() {
return Std::bool_constant<Traits::VectorTraits<T>::isVector>(); return Std::bool_constant<Traits::VectorTraits<std::decay_t<T>>::isVector>();
} }
template <class T> template <class T>
constexpr auto isMatrix() { constexpr auto isMatrix() {
return Std::bool_constant<Traits::MatrixTraits<T>::isMatrix>(); return Std::bool_constant<Traits::MatrixTraits<std::decay_t<T>>::isMatrix>();
} }
template <class T> template <class T>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment