Skip to content

Commit

Permalink
revert fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samayala22 committed May 23, 2024
1 parent c737537 commit 234f719
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion headeronly/linalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ namespace linalg

// Type traits for custom scalar
enum class Type {Scalar, NonScalar};
template<typename T, typename V = void> struct has_type_definition : std::false_type {};
template<typename T> struct has_type_definition<T, std::void_t<decltype(T::_linalg_type)>> : std::true_type {};
template<typename T, typename Enable = void> struct is_custom_scalar : std::false_type {};
template<typename T> struct is_custom_scalar<T, std::enable_if_t<std::is_same<decltype(T::_linalg_type), Type>::value && (T::_linalg_type == Type::Scalar)>> : std::true_type {};
template<typename T> struct is_custom_scalar<T, std::enable_if_t<has_type_definition<T>::value && (T::_linalg_type == Type::Scalar)>> : std::true_type {};

// SFINAE helper which is defined if all provided types are scalars
struct empty {};
Expand Down

0 comments on commit 234f719

Please sign in to comment.