Skip to content

Commit

Permalink
Merge pull request #849 from cppalliance/bool_const
Browse files Browse the repository at this point in the history
Remove decimal32 bool constructor
  • Loading branch information
mborland authored Jan 31, 2025
2 parents e02d08a + 3e5e646 commit cd1e650
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions include/boost/decimal/decimal32.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,6 @@ BOOST_DECIMAL_EXPORT class decimal32 final // NOLINT(cppcoreguidelines-special-m
#endif
constexpr decimal32(T coeff, T2 exp, bool sign = false) noexcept;

#ifdef BOOST_DECIMAL_HAS_CONCEPTS
template <BOOST_DECIMAL_INTEGRAL T>
#else
template <typename T, std::enable_if_t<detail::is_integral_v<T>, bool> = true>
#endif
constexpr decimal32(bool coeff, T exp, bool sign = false) noexcept;

constexpr decimal32(const decimal32& val) noexcept = default;
constexpr decimal32(decimal32&& val) noexcept = default;
constexpr auto operator=(const decimal32& val) noexcept -> decimal32& = default;
Expand Down Expand Up @@ -1557,16 +1550,6 @@ constexpr auto decimal32::operator=(const Integer& val) noexcept
return *this;
}

#ifdef BOOST_DECIMAL_HAS_CONCEPTS
template <BOOST_DECIMAL_INTEGRAL T>
#else
template <typename T, std::enable_if_t<detail::is_integral_v<T>, bool>>
#endif
constexpr decimal32::decimal32(bool coeff, T exp, bool sign) noexcept
{
*this = decimal32(static_cast<std::int32_t>(coeff), exp, sign);
}

constexpr decimal32::operator bool() const noexcept
{
constexpr decimal32 zero {0, 0};
Expand Down

0 comments on commit cd1e650

Please sign in to comment.