diff --git a/Library/include/playrho/detail/Checked.hpp b/Library/include/playrho/detail/Checked.hpp index 857676384b..93c8fca2d4 100644 --- a/Library/include/playrho/detail/Checked.hpp +++ b/Library/include/playrho/detail/Checked.hpp @@ -194,7 +194,7 @@ class Checked std::enable_if_t && !IsChecked>::value, int> = 0> constexpr Checked(U&& value) noexcept(NoExcept): - m_value{Validate(std::forward(value))} + m_value{Validate(ValueType(std::forward(value)))} { // Intentionally empty. } @@ -207,7 +207,7 @@ class Checked std::enable_if_t< std::is_constructible_v && !std::is_same_v, int> = 0> - constexpr Checked(const Checked& other) noexcept: + constexpr Checked(const Checked& other) noexcept(NoExcept): m_value{Validate(other.get())} { // Intentionally empty. diff --git a/Library/include/playrho/detail/CheckedMath.hpp b/Library/include/playrho/detail/CheckedMath.hpp index 28c6284d71..47ba79e9bd 100644 --- a/Library/include/playrho/detail/CheckedMath.hpp +++ b/Library/include/playrho/detail/CheckedMath.hpp @@ -50,7 +50,7 @@ auto abs(const Checked& arg) /// @see https://en.cppreference.com/w/cpp/numeric/math/nextafter template auto nextafter(const Checked& from, // force newline - const Checked& to) noexcept + const Checked& to) -> decltype(Checked(nextafter(from.get(), to.get()))) { using std::nextafter;