diff --git a/platform/include/roughpy/generics/comparison_trait.h b/platform/include/roughpy/generics/comparison_trait.h index 8c30f9ed..f5e0b71a 100644 --- a/platform/include/roughpy/generics/comparison_trait.h +++ b/platform/include/roughpy/generics/comparison_trait.h @@ -28,7 +28,7 @@ class ConstRef; */ class ROUGHPY_PLATFORM_EXPORT ComparisonTrait : public BuiltinTrait { - const Type* p_type; + RPY_MAYBE_UNUSED const Type* p_type; protected: constexpr explicit ComparisonTrait(const Type* type) diff --git a/platform/include/roughpy/generics/number_trait.h b/platform/include/roughpy/generics/number_trait.h index 75d6c5f1..ca95ff3e 100644 --- a/platform/include/roughpy/generics/number_trait.h +++ b/platform/include/roughpy/generics/number_trait.h @@ -252,7 +252,7 @@ struct AbsFunc : NoSuchFunction { }; template -struct AbsFunc()))>> { +struct AbsFunc())), enable_if_t>>> { using result_t = decltype(abs(declval())); static constexpr bool has_function = true; @@ -263,6 +263,18 @@ struct AbsFunc()))>> { } }; +template +struct AbsFunc>> +{ + using result_t = T; + static constexpr bool has_function = true; + constexpr result_t operator()(const T& val) const + { + return val; + } +}; + + template struct SqrtFunc : NoSuchFunction { }; diff --git a/roughpy/src/algebra/lie_key.cpp b/roughpy/src/algebra/lie_key.cpp index 5e5bf7ed..12a0a8e8 100644 --- a/roughpy/src/algebra/lie_key.cpp +++ b/roughpy/src/algebra/lie_key.cpp @@ -298,8 +298,8 @@ namespace { class ToLieKeyHelper { using container_type = typename python::PyLieKey::container_type; - dimn_t size; - dimn_t current; + RPY_MAYBE_UNUSED dimn_t size; + RPY_MAYBE_UNUSED dimn_t current; algebra::LieBasis basis; deg_t width; let_t max_letter = 0;