diff --git a/arbor/include/arbor/util/any_ptr.hpp b/arbor/include/arbor/util/any_ptr.hpp index c16247871..8e9df9d18 100644 --- a/arbor/include/arbor/util/any_ptr.hpp +++ b/arbor/include/arbor/util/any_ptr.hpp @@ -61,7 +61,7 @@ struct ARB_SYMBOL_VISIBLE any_ptr { template ::value>> constexpr T as() const noexcept { - if (std::is_same::value) { + if constexpr (std::is_same_v) { return (T)ptr_; } else { diff --git a/modcc/symge.hpp b/modcc/symge.hpp index 4ed8a9237..a1419b7e4 100644 --- a/modcc/symge.hpp +++ b/modcc/symge.hpp @@ -46,7 +46,7 @@ struct symbol_term { symbol left, right; symbol_term() = default; - symbol_term(const symbol left): left(std::move(left)) {} + symbol_term(symbol left): left(std::move(left)) {} symbol_term(symbol left, symbol right): left(std::move(left)), right(std::move(right)) {} bool is_zero() const { return !left || !right; } operator bool() const { return !is_zero(); } @@ -56,7 +56,7 @@ struct symbol_term_diff { symbol_term left, right; symbol_term_diff() = default; - symbol_term_diff(const symbol_term left): left(std::move(left)) {} + symbol_term_diff(symbol_term left): left(std::move(left)) {} symbol_term_diff(symbol_term left, symbol_term right): left(std::move(left)), right(std::move(right)) {} };