Skip to content

Commit dfabd0f

Browse files
committed
Remove maybe unused attribute from static constexpr member variables
1 parent 6868405 commit dfabd0f

File tree

7 files changed

+224
-224
lines changed

7 files changed

+224
-224
lines changed

include/boost/decimal/decimal128.hpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,45 +2187,45 @@ struct numeric_limits<boost::decimal::decimal128>
21872187
public:
21882188
#endif
21892189

2190-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_specialized = true;
2191-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_signed = true;
2192-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_integer = false;
2193-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_exact = false;
2194-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_infinity = true;
2195-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_quiet_NaN = true;
2196-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_signaling_NaN = true;
2190+
static constexpr bool is_specialized = true;
2191+
static constexpr bool is_signed = true;
2192+
static constexpr bool is_integer = false;
2193+
static constexpr bool is_exact = false;
2194+
static constexpr bool has_infinity = true;
2195+
static constexpr bool has_quiet_NaN = true;
2196+
static constexpr bool has_signaling_NaN = true;
21972197

21982198
// These members were deprecated in C++23
21992199
#if ((!defined(_MSC_VER) && (__cplusplus <= 202002L)) || (defined(_MSC_VER) && (_MSVC_LANG <= 202002L)))
2200-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr std::float_denorm_style has_denorm = std::denorm_present;
2201-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_denorm_loss = true;
2200+
static constexpr std::float_denorm_style has_denorm = std::denorm_present;
2201+
static constexpr bool has_denorm_loss = true;
22022202
#endif
22032203

2204-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr std::float_round_style round_style = std::round_indeterminate;
2205-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_iec559 = true;
2206-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_bounded = true;
2207-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_modulo = false;
2208-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int digits = 34;
2209-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int digits10 = digits;
2210-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_digits10 = digits;
2211-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int radix = 10;
2212-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int min_exponent = -6142;
2213-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int min_exponent10 = min_exponent;
2214-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_exponent = 6145;
2215-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_exponent10 = max_exponent;
2216-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool traps = numeric_limits<std::uint64_t>::traps;
2217-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool tinyness_before = true;
2204+
static constexpr std::float_round_style round_style = std::round_indeterminate;
2205+
static constexpr bool is_iec559 = true;
2206+
static constexpr bool is_bounded = true;
2207+
static constexpr bool is_modulo = false;
2208+
static constexpr int digits = 34;
2209+
static constexpr int digits10 = digits;
2210+
static constexpr int max_digits10 = digits;
2211+
static constexpr int radix = 10;
2212+
static constexpr int min_exponent = -6142;
2213+
static constexpr int min_exponent10 = min_exponent;
2214+
static constexpr int max_exponent = 6145;
2215+
static constexpr int max_exponent10 = max_exponent;
2216+
static constexpr bool traps = numeric_limits<std::uint64_t>::traps;
2217+
static constexpr bool tinyness_before = true;
22182218

22192219
// Member functions
2220-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto (min) () -> boost::decimal::decimal128 { return {1, min_exponent}; }
2221-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto (max) () -> boost::decimal::decimal128 { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent}; }
2222-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto lowest () -> boost::decimal::decimal128 { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent, true}; }
2223-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto epsilon () -> boost::decimal::decimal128 { return {1, -34}; }
2224-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto round_error () -> boost::decimal::decimal128 { return epsilon(); }
2225-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto infinity () -> boost::decimal::decimal128 { return boost::decimal::from_bits(boost::decimal::detail::d128_inf_mask); }
2226-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto quiet_NaN () -> boost::decimal::decimal128 { return boost::decimal::from_bits(boost::decimal::detail::d128_nan_mask); }
2227-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto signaling_NaN() -> boost::decimal::decimal128 { return boost::decimal::from_bits(boost::decimal::detail::d128_snan_mask); }
2228-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto denorm_min () -> boost::decimal::decimal128 { return {1, boost::decimal::detail::etiny_v<boost::decimal::decimal128>}; }
2220+
static constexpr auto (min) () -> boost::decimal::decimal128 { return {1, min_exponent}; }
2221+
static constexpr auto (max) () -> boost::decimal::decimal128 { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent}; }
2222+
static constexpr auto lowest () -> boost::decimal::decimal128 { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent, true}; }
2223+
static constexpr auto epsilon () -> boost::decimal::decimal128 { return {1, -34}; }
2224+
static constexpr auto round_error () -> boost::decimal::decimal128 { return epsilon(); }
2225+
static constexpr auto infinity () -> boost::decimal::decimal128 { return boost::decimal::from_bits(boost::decimal::detail::d128_inf_mask); }
2226+
static constexpr auto quiet_NaN () -> boost::decimal::decimal128 { return boost::decimal::from_bits(boost::decimal::detail::d128_nan_mask); }
2227+
static constexpr auto signaling_NaN() -> boost::decimal::decimal128 { return boost::decimal::from_bits(boost::decimal::detail::d128_snan_mask); }
2228+
static constexpr auto denorm_min () -> boost::decimal::decimal128 { return {1, boost::decimal::detail::etiny_v<boost::decimal::decimal128>}; }
22292229
};
22302230

22312231
} //namespace std

include/boost/decimal/decimal128_fast.hpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,45 +1428,45 @@ struct numeric_limits<boost::decimal::decimal128_fast>
14281428
public:
14291429
#endif
14301430

1431-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_specialized = true;
1432-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_signed = true;
1433-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_integer = false;
1434-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_exact = false;
1435-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_infinity = true;
1436-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_quiet_NaN = true;
1437-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_signaling_NaN = true;
1431+
static constexpr bool is_specialized = true;
1432+
static constexpr bool is_signed = true;
1433+
static constexpr bool is_integer = false;
1434+
static constexpr bool is_exact = false;
1435+
static constexpr bool has_infinity = true;
1436+
static constexpr bool has_quiet_NaN = true;
1437+
static constexpr bool has_signaling_NaN = true;
14381438

14391439
// These members were deprecated in C++23
14401440
#if ((!defined(_MSC_VER) && (__cplusplus <= 202002L)) || (defined(_MSC_VER) && (_MSVC_LANG <= 202002L)))
1441-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr std::float_denorm_style has_denorm = std::denorm_present;
1442-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_denorm_loss = true;
1441+
static constexpr std::float_denorm_style has_denorm = std::denorm_present;
1442+
static constexpr bool has_denorm_loss = true;
14431443
#endif
14441444

1445-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr std::float_round_style round_style = std::round_indeterminate;
1446-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_iec559 = false;
1447-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_bounded = true;
1448-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_modulo = false;
1449-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int digits = 34;
1450-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int digits10 = digits;
1451-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_digits10 = digits;
1452-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int radix = 10;
1453-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int min_exponent = -6142;
1454-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int min_exponent10 = min_exponent;
1455-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_exponent = 6145;
1456-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_exponent10 = max_exponent;
1457-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool traps = numeric_limits<std::uint64_t>::traps;
1458-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool tinyness_before = true;
1445+
static constexpr std::float_round_style round_style = std::round_indeterminate;
1446+
static constexpr bool is_iec559 = false;
1447+
static constexpr bool is_bounded = true;
1448+
static constexpr bool is_modulo = false;
1449+
static constexpr int digits = 34;
1450+
static constexpr int digits10 = digits;
1451+
static constexpr int max_digits10 = digits;
1452+
static constexpr int radix = 10;
1453+
static constexpr int min_exponent = -6142;
1454+
static constexpr int min_exponent10 = min_exponent;
1455+
static constexpr int max_exponent = 6145;
1456+
static constexpr int max_exponent10 = max_exponent;
1457+
static constexpr bool traps = numeric_limits<std::uint64_t>::traps;
1458+
static constexpr bool tinyness_before = true;
14591459

14601460
// Member functions
1461-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto (min) () -> boost::decimal::decimal128_fast { return {1, min_exponent}; }
1462-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto (max) () -> boost::decimal::decimal128_fast { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent}; }
1463-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto lowest () -> boost::decimal::decimal128_fast { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent, true}; }
1464-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto epsilon () -> boost::decimal::decimal128_fast { return {1, -34}; }
1465-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto round_error () -> boost::decimal::decimal128_fast { return epsilon(); }
1466-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto infinity () -> boost::decimal::decimal128_fast { return boost::decimal::direct_init_d128(boost::decimal::detail::d128_fast_inf, 0, false); }
1467-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto quiet_NaN () -> boost::decimal::decimal128_fast { return boost::decimal::direct_init_d128(boost::decimal::detail::d128_fast_qnan, 0, false); }
1468-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto signaling_NaN() -> boost::decimal::decimal128_fast { return boost::decimal::direct_init_d128(boost::decimal::detail::d128_fast_snan, 0, false); }
1469-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto denorm_min () -> boost::decimal::decimal128_fast { return {1, boost::decimal::detail::etiny_v<boost::decimal::decimal128>}; }
1461+
static constexpr auto (min) () -> boost::decimal::decimal128_fast { return {1, min_exponent}; }
1462+
static constexpr auto (max) () -> boost::decimal::decimal128_fast { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent}; }
1463+
static constexpr auto lowest () -> boost::decimal::decimal128_fast { return {boost::decimal::detail::uint128{UINT64_C(999'999'999'999'999), UINT64_C(9'999'999'999'999'999'999)}, max_exponent, true}; }
1464+
static constexpr auto epsilon () -> boost::decimal::decimal128_fast { return {1, -34}; }
1465+
static constexpr auto round_error () -> boost::decimal::decimal128_fast { return epsilon(); }
1466+
static constexpr auto infinity () -> boost::decimal::decimal128_fast { return boost::decimal::direct_init_d128(boost::decimal::detail::d128_fast_inf, 0, false); }
1467+
static constexpr auto quiet_NaN () -> boost::decimal::decimal128_fast { return boost::decimal::direct_init_d128(boost::decimal::detail::d128_fast_qnan, 0, false); }
1468+
static constexpr auto signaling_NaN() -> boost::decimal::decimal128_fast { return boost::decimal::direct_init_d128(boost::decimal::detail::d128_fast_snan, 0, false); }
1469+
static constexpr auto denorm_min () -> boost::decimal::decimal128_fast { return {1, boost::decimal::detail::etiny_v<boost::decimal::decimal128>}; }
14701470
};
14711471

14721472
}

include/boost/decimal/decimal32.hpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,45 +2202,45 @@ struct numeric_limits<boost::decimal::decimal32>
22022202
public:
22032203
#endif
22042204

2205-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_specialized = true;
2206-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_signed = true;
2207-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_integer = false;
2208-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_exact = false;
2209-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_infinity = true;
2210-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_quiet_NaN = true;
2211-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_signaling_NaN = true;
2205+
static constexpr bool is_specialized = true;
2206+
static constexpr bool is_signed = true;
2207+
static constexpr bool is_integer = false;
2208+
static constexpr bool is_exact = false;
2209+
static constexpr bool has_infinity = true;
2210+
static constexpr bool has_quiet_NaN = true;
2211+
static constexpr bool has_signaling_NaN = true;
22122212

22132213
// These members were deprecated in C++23
22142214
#if ((!defined(_MSC_VER) && (__cplusplus <= 202002L)) || (defined(_MSC_VER) && (_MSVC_LANG <= 202002L)))
2215-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr std::float_denorm_style has_denorm = std::denorm_present;
2216-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool has_denorm_loss = true;
2215+
static constexpr std::float_denorm_style has_denorm = std::denorm_present;
2216+
static constexpr bool has_denorm_loss = true;
22172217
#endif
22182218

2219-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr std::float_round_style round_style = std::round_indeterminate;
2220-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_iec559 = true;
2221-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_bounded = true;
2222-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool is_modulo = false;
2223-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int digits = 7;
2224-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int digits10 = digits;
2225-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_digits10 = digits;
2226-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int radix = 10;
2227-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int min_exponent = -95;
2228-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int min_exponent10 = min_exponent;
2229-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_exponent = 96;
2230-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr int max_exponent10 = max_exponent;
2231-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool traps = numeric_limits<std::uint32_t>::traps;
2232-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr bool tinyness_before = true;
2219+
static constexpr std::float_round_style round_style = std::round_indeterminate;
2220+
static constexpr bool is_iec559 = true;
2221+
static constexpr bool is_bounded = true;
2222+
static constexpr bool is_modulo = false;
2223+
static constexpr int digits = 7;
2224+
static constexpr int digits10 = digits;
2225+
static constexpr int max_digits10 = digits;
2226+
static constexpr int radix = 10;
2227+
static constexpr int min_exponent = -95;
2228+
static constexpr int min_exponent10 = min_exponent;
2229+
static constexpr int max_exponent = 96;
2230+
static constexpr int max_exponent10 = max_exponent;
2231+
static constexpr bool traps = numeric_limits<std::uint32_t>::traps;
2232+
static constexpr bool tinyness_before = true;
22332233

22342234
// Member functions
2235-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto (min) () -> boost::decimal::decimal32 { return {1, min_exponent}; }
2236-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto (max) () -> boost::decimal::decimal32 { return {9'999'999, max_exponent}; }
2237-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto lowest () -> boost::decimal::decimal32 { return {-9'999'999, max_exponent}; }
2238-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto epsilon () -> boost::decimal::decimal32 { return {1, -7}; }
2239-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto round_error () -> boost::decimal::decimal32 { return epsilon(); }
2240-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto infinity () -> boost::decimal::decimal32 { return boost::decimal::from_bits(boost::decimal::detail::d32_inf_mask); }
2241-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto quiet_NaN () -> boost::decimal::decimal32 { return boost::decimal::from_bits(boost::decimal::detail::d32_nan_mask); }
2242-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto signaling_NaN() -> boost::decimal::decimal32 { return boost::decimal::from_bits(boost::decimal::detail::d32_snan_mask); }
2243-
BOOST_DECIMAL_ATTRIBUTE_UNUSED static constexpr auto denorm_min () -> boost::decimal::decimal32 { return {1, boost::decimal::detail::etiny}; }
2235+
static constexpr auto (min) () -> boost::decimal::decimal32 { return {1, min_exponent}; }
2236+
static constexpr auto (max) () -> boost::decimal::decimal32 { return {9'999'999, max_exponent}; }
2237+
static constexpr auto lowest () -> boost::decimal::decimal32 { return {-9'999'999, max_exponent}; }
2238+
static constexpr auto epsilon () -> boost::decimal::decimal32 { return {1, -7}; }
2239+
static constexpr auto round_error () -> boost::decimal::decimal32 { return epsilon(); }
2240+
static constexpr auto infinity () -> boost::decimal::decimal32 { return boost::decimal::from_bits(boost::decimal::detail::d32_inf_mask); }
2241+
static constexpr auto quiet_NaN () -> boost::decimal::decimal32 { return boost::decimal::from_bits(boost::decimal::detail::d32_nan_mask); }
2242+
static constexpr auto signaling_NaN() -> boost::decimal::decimal32 { return boost::decimal::from_bits(boost::decimal::detail::d32_snan_mask); }
2243+
static constexpr auto denorm_min () -> boost::decimal::decimal32 { return {1, boost::decimal::detail::etiny}; }
22442244
};
22452245

22462246
} // Namespace std

0 commit comments

Comments
 (0)