Skip to content

Commit 51cfc31

Browse files
committed
Add typedefs and deprecation warnings
1 parent f2307f9 commit 51cfc31

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

include/boost/decimal/decimal128.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ BOOST_DECIMAL_CONSTEXPR_VARIABLE int128::uint128_t d128_max_significand_value {U
8989

9090
} //namespace detail
9191

92+
[[deprecated("Use re-named type decimal128_t instead of decimal128")]]
9293
BOOST_DECIMAL_EXPORT class decimal128 final
9394
{
9495
public:
@@ -543,6 +544,8 @@ BOOST_DECIMAL_EXPORT class decimal128 final
543544
friend constexpr auto fmad128(decimal128 x, decimal128 y, decimal128 z) noexcept -> decimal128;
544545
};
545546

547+
using decimal128_t = decimal128;
548+
546549
#if !defined(BOOST_DECIMAL_DISABLE_IOSTREAM)
547550
inline std::string bit_string(decimal128 rhs) noexcept
548551
{

include/boost/decimal/decimal128_fast.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ BOOST_DECIMAL_CONSTEXPR_VARIABLE auto d128_fast_snan_high_bits = UINT64_MAX;
4040

4141
} // namespace detail
4242

43+
[[deprecated("Use re-named type decimal_fast128_t instead of decimal128_fast")]]
4344
BOOST_DECIMAL_EXPORT class decimal128_fast final
4445
{
4546
public:
@@ -369,6 +370,8 @@ BOOST_DECIMAL_EXPORT class decimal128_fast final
369370
friend constexpr auto quantized128f(const decimal128_fast& lhs, const decimal128_fast& rhs) noexcept -> decimal128_fast;
370371
};
371372

373+
using decimal_fast128_t = decimal128_fast;
374+
372375
#ifdef BOOST_DECIMAL_HAS_CONCEPTS
373376
template <BOOST_DECIMAL_UNSIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>
374377
#else

include/boost/decimal/decimal32.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ BOOST_DECIMAL_CONSTEXPR_VARIABLE std::uint32_t d32_max_significand_value = UINT3
101101

102102
// ISO/IEC DTR 24733
103103
// 3.2.2 class decimal32
104+
[[deprecated("Use re-named type decimal32_t instead of decimal32")]]
104105
BOOST_DECIMAL_EXPORT class decimal32 final // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)
105106
{
106107
public:
@@ -563,6 +564,8 @@ BOOST_DECIMAL_EXPORT class decimal32 final // NOLINT(cppcoreguidelines-special-m
563564
constexpr auto edit_sign(bool sign) noexcept -> void;
564565
};
565566

567+
BOOST_DECIMAL_EXPORT using decimal32_t = decimal32;
568+
566569
#if defined(__GNUC__) && __GNUC__ >= 8
567570
# pragma GCC diagnostic pop
568571
#endif

include/boost/decimal/decimal32_fast.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ BOOST_DECIMAL_CONSTEXPR_VARIABLE auto d32_fast_snan = std::numeric_limits<std::u
3535

3636
}
3737

38+
[[deprecated("Use re-named type decimal_fast32_t instead of decimal32_fast")]]
3839
BOOST_DECIMAL_EXPORT class decimal32_fast final
3940
{
4041
public:
@@ -374,6 +375,8 @@ BOOST_DECIMAL_EXPORT class decimal32_fast final
374375
friend constexpr auto quantized32f(decimal32_fast lhs, decimal32_fast rhs) noexcept -> decimal32_fast;
375376
};
376377

378+
BOOST_DECIMAL_EXPORT using decimal_fast32_t = decimal32_fast;
379+
377380
template <typename T1, typename T2, std::enable_if_t<detail::is_unsigned_v<T1> && detail::is_integral_v<T2>, bool>>
378381
constexpr decimal32_fast::decimal32_fast(T1 coeff, T2 exp, bool sign) noexcept
379382
{

include/boost/decimal/decimal64.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ BOOST_DECIMAL_CONSTEXPR_VARIABLE std::uint64_t d64_max_significand_value = UINT6
9696
# pragma GCC diagnostic ignored "-Wclass-memaccess"
9797
#endif
9898

99+
[[deprecated("Use re-named type decimal64_t instead of decimal64")]]
99100
BOOST_DECIMAL_EXPORT class decimal64 final
100101
{
101102
public:
@@ -551,6 +552,8 @@ BOOST_DECIMAL_EXPORT class decimal64 final
551552
friend constexpr auto scalblnd64(decimal64 num, long exp) noexcept -> decimal64;
552553
};
553554

555+
using decimal64_t = decimal64;
556+
554557
#if defined(__GNUC__) && __GNUC__ >= 8
555558
# pragma GCC diagnostic pop
556559
#endif

include/boost/decimal/decimal64_fast.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct decimal64_fast_components
4848

4949
} // namespace detail
5050

51+
[[deprecated("Use re-named type decimal_fast64_t instead of decimal64_fast")]]
5152
BOOST_DECIMAL_EXPORT class decimal64_fast final
5253
{
5354
public:
@@ -382,6 +383,8 @@ BOOST_DECIMAL_EXPORT class decimal64_fast final
382383
friend constexpr auto scalblnd64f(decimal64_fast num, long exp) noexcept -> decimal64_fast;
383384
};
384385

386+
using decimal_fast64_t = decimal64_fast;
387+
385388
#ifdef BOOST_DECIMAL_HAS_CONCEPTS
386389
template <BOOST_DECIMAL_UNSIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>
387390
#else

0 commit comments

Comments
 (0)