|
59 | 59 |
|
60 | 60 | #if (defined(_MSC_VER) && (!defined(__GNUC__) && !defined(__clang__)))
|
61 | 61 | #if (_MSC_VER >= 1900) && defined(_HAS_CXX20) && (_HAS_CXX20 != 0)
|
62 |
| - #define WIDE_INTEGER_NODISCARD [[nodiscard]] // NOLINT(cppcoreguidelines-macro-usage) |
| 62 | + #define WIDE_INTEGER_NODISCARD [[nodiscard]] // NOLINT(cppcoreguidelines-macro-usage) |
63 | 63 | #else
|
64 | 64 | #define WIDE_INTEGER_NODISCARD
|
65 | 65 | #endif
|
66 | 66 | #else
|
67 |
| - #if (defined(__cplusplus) && (__cplusplus >= 201402L)) |
68 |
| - #if defined(__AVR__) && (!defined(__GNUC__) || (defined(__GNUC__) && (__cplusplus >= 202002L))) |
69 |
| - #define WIDE_INTEGER_NODISCARD [[nodiscard]] // NOLINT(cppcoreguidelines-macro-usage) |
70 |
| - #elif (defined(__cpp_lib_constexpr_algorithms) && (__cpp_lib_constexpr_algorithms >= 201806)) |
71 |
| - #if defined(__clang__) |
72 |
| - #if (__clang_major__ > 9) |
73 |
| - #define WIDE_INTEGER_NODISCARD [[nodiscard]] // NOLINT(cppcoreguidelines-macro-usage) |
74 |
| - #else |
75 |
| - #define WIDE_INTEGER_NODISCARD |
76 |
| - #endif |
77 |
| - #else |
78 |
| - #define WIDE_INTEGER_NODISCARD [[nodiscard]] // NOLINT(cppcoreguidelines-macro-usage) |
79 |
| - #endif |
80 |
| - #elif (defined(__clang__) && (__clang_major__ >= 10)) && (defined(__cplusplus) && (__cplusplus > 201703L)) |
81 |
| - #if defined(__x86_64__) |
82 |
| - #define WIDE_INTEGER_NODISCARD [[nodiscard]] // NOLINT(cppcoreguidelines-macro-usage) |
83 |
| - #else |
84 |
| - #define WIDE_INTEGER_NODISCARD |
85 |
| - #endif |
86 |
| - #else |
87 |
| - #define WIDE_INTEGER_NODISCARD |
88 |
| - #endif |
| 67 | + #if ((defined(__cplusplus) && (__cplusplus >= 201703L)) && (defined(__has_cpp_attribute) && (__has_cpp_attribute(nodiscard) >= 201603L))) |
| 68 | + #define WIDE_INTEGER_NODISCARD [[nodiscard]] // NOLINT(cppcoreguidelines-macro-usage) |
89 | 69 | #else
|
90 | 70 | #define WIDE_INTEGER_NODISCARD
|
91 | 71 | #endif
|
|
2928 | 2908 | return result_min;
|
2929 | 2909 | }
|
2930 | 2910 |
|
2931 |
| - template<const bool OtherIsSigned> |
2932 |
| - static constexpr auto limits_helper_lowest() -> uintwide_t |
2933 |
| - { |
2934 |
| - return limits_helper_min<OtherIsSigned>(); |
2935 |
| - } |
2936 |
| - |
2937 | 2911 | // Write string function.
|
2938 | 2912 | template<typename OutputStrIterator>
|
2939 | 2913 | constexpr auto wr_string( OutputStrIterator str_result, // NOLINT(readability-function-cognitive-complexity)
|
|
5507 | 5481 | static constexpr int max_exponent = digits;
|
5508 | 5482 | static constexpr int max_exponent10 = static_cast<int>((static_cast<std::uintmax_t>(max_exponent) * UINTMAX_C(75257499)) / UINTMAX_C(250000000));
|
5509 | 5483 |
|
5510 |
| - static constexpr auto (max) () -> local_wide_integer_type { return local_wide_integer_type::template limits_helper_max <IsSigned>(); } |
5511 |
| - static constexpr auto (min) () -> local_wide_integer_type { return local_wide_integer_type::template limits_helper_min <IsSigned>(); } |
5512 |
| - static constexpr auto lowest() -> local_wide_integer_type { return local_wide_integer_type::template limits_helper_lowest<IsSigned>(); } |
| 5484 | + static constexpr auto (max) () -> local_wide_integer_type { return local_wide_integer_type::template limits_helper_max<IsSigned>(); } |
| 5485 | + static constexpr auto (min) () -> local_wide_integer_type { return local_wide_integer_type::template limits_helper_min<IsSigned>(); } |
| 5486 | + static constexpr auto lowest() -> local_wide_integer_type { return local_wide_integer_type::template limits_helper_min<IsSigned>(); } |
5513 | 5487 | };
|
5514 | 5488 |
|
5515 | 5489 | template<class T>
|
|
0 commit comments