From d15bed27c84da9fb994caabc73d56949b087926c Mon Sep 17 00:00:00 2001 From: Gang Wu Date: Fri, 6 Nov 2026 17:48:10 +0800 Subject: [PATCH] fix(build): avoid digit separators in expected preprocessor checks --- src/iceberg/compat/expected.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/iceberg/compat/expected.h b/src/iceberg/compat/expected.h index 46b987fb4..029a2ce6d 100644 --- a/src/iceberg/compat/expected.h +++ b/src/iceberg/compat/expected.h @@ -89,11 +89,11 @@ # define ICEBERG_EXPECTED_CPLUSPLUS __cplusplus #endif -#if ICEBERG_EXPECTED_CPLUSPLUS < 201'703L +#if ICEBERG_EXPECTED_CPLUSPLUS < 201703L static_assert(false, "This expected variant requires C++17"); #endif -#if ICEBERG_EXPECTED_CPLUSPLUS >= 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS >= 202002L # define ICEBERG_EXPECTED_CONSTEXPR_DTOR constexpr #else # define ICEBERG_EXPECTED_CONSTEXPR_DTOR @@ -113,7 +113,7 @@ namespace expected_detail { template constexpr T* construct_at(T* p, Args&&... args) noexcept( noexcept(::new (static_cast(p)) T(std::forward(args)...))) { -#if ICEBERG_EXPECTED_CPLUSPLUS >= 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS >= 202002L return std::construct_at(p, std::forward(args)...); #else return ::new (static_cast(p)) T(std::forward(args)...); @@ -1943,7 +1943,7 @@ class ICEBERG_TEMPLATE_CLASS_EXPORT [[nodiscard]] expected return x.error() == y.error(); } } -#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L template [[nodiscard]] friend constexpr std::enable_if_t< !std::is_void_v && @@ -1968,7 +1968,7 @@ class ICEBERG_TEMPLATE_CLASS_EXPORT [[nodiscard]] expected return false; } } -#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L template [[nodiscard]] friend constexpr std::enable_if_t< !expected_detail::is_specialization_v && @@ -1989,7 +1989,7 @@ class ICEBERG_TEMPLATE_CLASS_EXPORT [[nodiscard]] expected return x.error() == e.error(); } } -#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L template [[nodiscard]] friend constexpr std::enable_if_t< expected_detail::is_equality_result_convertible_to_bool_v, bool> @@ -2540,7 +2540,7 @@ expected : private expected_detail::move_assign_base, return x.error() == y.error(); } } -#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L template [[nodiscard]] friend constexpr std::enable_if_t< std::is_void_v && @@ -2562,7 +2562,7 @@ expected : private expected_detail::move_assign_base, return x.error() == e.error(); } } -#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L template [[nodiscard]] friend constexpr std::enable_if_t< expected_detail::is_equality_result_convertible_to_bool_v, bool> @@ -2572,7 +2572,7 @@ expected : private expected_detail::move_assign_base, #endif }; -#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L +#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L // Deduce the expected operand to reject conversions exposed by MSVC's permissive C++17 // hidden-friend lookup. template