This is an automated email from the ASF dual-hosted git repository.
wgtmac pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 19c41dd7 fix(build): avoid digit separators in expected preprocessor
checks (#1098)
19c41dd7 is described below
commit 19c41dd7f28de3e9c0434724596d3680c02cdb91
Author: Gang Wu <[email protected]>
AuthorDate: Mon Nov 9 09:55:29 2026 +0800
fix(build): avoid digit separators in expected preprocessor checks (#1098)
---
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 46b987fb..029a2ce6 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 <class T, class... Args>
constexpr T* construct_at(T* p, Args&&... args) noexcept(
noexcept(::new (static_cast<void*>(p)) T(std::forward<Args>(args)...))) {
-#if ICEBERG_EXPECTED_CPLUSPLUS >= 202'002L
+#if ICEBERG_EXPECTED_CPLUSPLUS >= 202002L
return std::construct_at(p, std::forward<Args>(args)...);
#else
return ::new (static_cast<void*>(p)) T(std::forward<Args>(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 <class T2, class E2>
[[nodiscard]] friend constexpr std::enable_if_t<
!std::is_void_v<T2> &&
@@ -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 <class T2>
[[nodiscard]] friend constexpr std::enable_if_t<
!expected_detail::is_specialization_v<T2, iceberg::expected> &&
@@ -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 <class E2>
[[nodiscard]] friend constexpr std::enable_if_t<
expected_detail::is_equality_result_convertible_to_bool_v<E, E2>, bool>
@@ -2540,7 +2540,7 @@ expected<void, E> : private
expected_detail::move_assign_base<void, E>,
return x.error() == y.error();
}
}
-#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L
+#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L
template <class T2, class E2>
[[nodiscard]] friend constexpr std::enable_if_t<
std::is_void_v<T2> &&
@@ -2562,7 +2562,7 @@ expected<void, E> : private
expected_detail::move_assign_base<void, E>,
return x.error() == e.error();
}
}
-#if ICEBERG_EXPECTED_CPLUSPLUS < 202'002L
+#if ICEBERG_EXPECTED_CPLUSPLUS < 202002L
template <class E2>
[[nodiscard]] friend constexpr std::enable_if_t<
expected_detail::is_equality_result_convertible_to_bool_v<E, E2>, bool>
@@ -2572,7 +2572,7 @@ expected<void, E> : private
expected_detail::move_assign_base<void, E>,
#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 <class T, class E, class T2>