Skip to content

Commit 0ae5554

Browse files
committed
Ignore padding warnings
1 parent 187f288 commit 0ae5554

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

include/boost/decimal/decimal_fast128_t.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE auto d128_fast_snan_high_bits = UINT64_M
3939

4040
} // namespace detail
4141

42+
#ifdef _MSC_VER
43+
# pragma warning(push)
44+
# pragma warning(disable : 4324) // Structure was padded due to alignment specifier
45+
#endif
46+
4247
BOOST_DECIMAL_EXPORT class decimal_fast128_t final
4348
{
4449
public:
@@ -396,6 +401,10 @@ BOOST_DECIMAL_EXPORT class decimal_fast128_t final
396401
friend constexpr auto quantized128f(const decimal_fast128_t& lhs, const decimal_fast128_t& rhs) noexcept -> decimal_fast128_t;
397402
};
398403

404+
#ifdef _MSC_VER
405+
# pragma warning(pop)
406+
#endif
407+
399408
#ifdef BOOST_DECIMAL_HAS_CONCEPTS
400409
template <BOOST_DECIMAL_UNSIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>
401410
#else

include/boost/decimal/detail/components.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ namespace detail {
1818

1919
namespace impl {
2020

21+
#ifdef _MSC_VER
22+
# pragma warning(push)
23+
# pragma warning(disable : 4324) // Structure was padded due to alignment specifier
24+
#endif
25+
2126
template <typename SigType, typename BiasedExpType>
2227
struct decimal_components
2328
{
@@ -69,6 +74,10 @@ using decimal128_t_components = impl::decimal_components<boost::int128::uint128_
6974

7075
using decimal_fast128_t_components = impl::decimal_components<boost::int128::uint128_t, std::int32_t>;
7176

77+
#ifdef _MSC_VER
78+
# pragma warning(pop)
79+
#endif
80+
7281
} // namespace detail
7382
} // namespace decimal
7483
} // namespace boost

include/boost/decimal/detail/ryu/ryu_generic_128.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,22 @@ namespace ryu {
3131
BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int32_t fd128_exceptional_exponent = 0x7FFFFFFF;
3232
BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE unsigned_128_type one = 1;
3333

34+
#ifdef _MSC_VER
35+
# pragma warning(push)
36+
# pragma warning(disable : 4324) // Structure was padded due to alignment specifier
37+
#endif
38+
3439
struct floating_decimal_128
3540
{
3641
unsigned_128_type mantissa;
3742
int32_t exponent;
3843
bool sign;
3944
};
4045

46+
#ifdef _MSC_VER
47+
# pragma warning(pop)
48+
#endif
49+
4150
#ifdef BOOST_DECIMAL_DEBUG_RYU
4251
static char* s(unsigned_128_type v) {
4352
int len = num_digits(v);

0 commit comments

Comments
 (0)