Skip to content

Commit 74383dc

Browse files
committed
C++20 is not required
1 parent 1454d88 commit 74383dc

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

include/boost/decimal/decimal32.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ BOOST_DECIMAL_EXPORT class decimal32 final // NOLINT(cppcoreguidelines-special-m
219219
friend constexpr auto sequential_less_impl(DecimalType lhs, DecimalType rhs) noexcept -> bool;
220220

221221
template <typename DecimalType>
222-
friend BOOST_DECIMAL_CXX20_CONSTEXPR auto to_dpd_d32(DecimalType val) noexcept
222+
friend constexpr auto to_dpd_d32(DecimalType val) noexcept
223223
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_decimal_floating_point_v, DecimalType, std::uint32_t);
224224

225225
public:

include/boost/decimal/decimal32_fast.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class decimal32_fast final
115115
detail::is_decimal_floating_point_v<Decimal2>), bool>;
116116

117117
template <typename DecimalType>
118-
friend BOOST_DECIMAL_CXX20_CONSTEXPR auto to_dpd_d32(DecimalType val) noexcept
118+
friend constexpr auto to_dpd_d32(DecimalType val) noexcept
119119
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_decimal_floating_point_v, DecimalType, std::uint32_t);
120120

121121
public:

include/boost/decimal/dpd_conversion.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ constexpr auto decode_dpd(std::uint32_t dpd_bits, std::uint8_t &d3, std::uint8_t
308308
} // namespace detail
309309

310310
template <typename DecimalType>
311-
BOOST_DECIMAL_CXX20_CONSTEXPR auto to_dpd_d32(DecimalType val) noexcept
311+
constexpr auto to_dpd_d32(DecimalType val) noexcept
312312
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_decimal_floating_point_v, DecimalType, std::uint32_t)
313313
{
314314
static_assert(std::is_same<DecimalType, decimal32>::value ||
@@ -413,18 +413,18 @@ BOOST_DECIMAL_CXX20_CONSTEXPR auto to_dpd_d32(DecimalType val) noexcept
413413
return dpd;
414414
}
415415

416-
BOOST_DECIMAL_CXX20_CONSTEXPR auto to_dpd(decimal32 val) noexcept -> std::uint32_t
416+
constexpr auto to_dpd(decimal32 val) noexcept -> std::uint32_t
417417
{
418418
return to_dpd_d32(val);
419419
}
420420

421-
BOOST_DECIMAL_CXX20_CONSTEXPR auto to_dpd(decimal32_fast val) noexcept -> std::uint32_t
421+
constexpr auto to_dpd(decimal32_fast val) noexcept -> std::uint32_t
422422
{
423423
return to_dpd_d32(val);
424424
}
425425

426426
template <typename DecimalType = decimal32_fast>
427-
BOOST_DECIMAL_CXX20_CONSTEXPR auto from_dpd_d32(std::uint32_t dpd) noexcept
427+
constexpr auto from_dpd_d32(std::uint32_t dpd) noexcept
428428
BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, DecimalType)
429429
{
430430
// The bit lengths are the same as used in the standard bid format
@@ -488,7 +488,7 @@ BOOST_DECIMAL_CXX20_CONSTEXPR auto from_dpd_d32(std::uint32_t dpd) noexcept
488488
}
489489

490490
template <typename DecimalType = decimal32_fast>
491-
BOOST_DECIMAL_CXX20_CONSTEXPR auto from_dpd(std::uint32_t bits) noexcept
491+
constexpr auto from_dpd(std::uint32_t bits) noexcept
492492
BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, DecimalType)
493493
{
494494
return from_dpd_d32<DecimalType>(bits);

0 commit comments

Comments
 (0)