Skip to content

Commit

Permalink
Updates to remove noexcept in some situations & to avoid implicit con…
Browse files Browse the repository at this point in the history
…version warnings
  • Loading branch information
louis-langholtz committed Oct 15, 2023
1 parent 6fb9139 commit 1137c98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Library/include/playrho/detail/Checked.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Checked
std::enable_if_t<std::is_constructible_v<ValueType, U&&> && !IsChecked<std::decay_t<U>>::value,
int> = 0>
constexpr Checked(U&& value) noexcept(NoExcept):
m_value{Validate(std::forward<U>(value))}
m_value{Validate(ValueType(std::forward<U>(value)))}
{
// Intentionally empty.
}
Expand All @@ -207,7 +207,7 @@ class Checked
std::enable_if_t<
std::is_constructible_v<ValueType, OtherValueType> && !std::is_same_v<Checker, OtherChecker>,
int> = 0>
constexpr Checked(const Checked<OtherValueType, OtherChecker, OtherNoExcept>& other) noexcept:
constexpr Checked(const Checked<OtherValueType, OtherChecker, OtherNoExcept>& other) noexcept(NoExcept):
m_value{Validate(other.get())}
{
// Intentionally empty.
Expand Down
2 changes: 1 addition & 1 deletion Library/include/playrho/detail/CheckedMath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ auto abs(const Checked<ValueType, Checker, NoExcept>& arg)
/// @see https://en.cppreference.com/w/cpp/numeric/math/nextafter
template <class ValueType, class Checker, bool NoExcept>
auto nextafter(const Checked<ValueType, Checker, NoExcept>& from, // force newline
const Checked<ValueType, Checker, NoExcept>& to) noexcept
const Checked<ValueType, Checker, NoExcept>& to)
-> decltype(Checked<ValueType, Checker, false>(nextafter(from.get(), to.get())))
{
using std::nextafter;
Expand Down

0 comments on commit 1137c98

Please sign in to comment.