From 2e2412b5734df339ab87062eb27f67db60148ef7 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 31 Aug 2024 13:14:21 +0200 Subject: [PATCH] ICU 75.1 requires C++17 This needs to be explicitly enabled for MSVC (and probably clang on Windows); otherwise the default is C++14, which is no longer sufficient for ICU[1]. While the official PHP 8.4 builds for Windows do not yet use ICU 75.1, that may change[2]. And even if not, it would be nice for custom builds to be able to build against ICU 75.1 (or later). Anyhow, using `std:c++17` is fine for ICU 72.1 which we are currently using (and likely for some older ICU versions). [1] [2] --- ext/intl/config.w32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/intl/config.w32 b/ext/intl/config.w32 index 8de0e1eff0fc9..f3c3e2cffd76a 100644 --- a/ext/intl/config.w32 +++ b/ext/intl/config.w32 @@ -126,7 +126,7 @@ if (PHP_INTL != "no") { ADD_FLAG("LIBS_INTL", "iculx.lib"); } - ADD_FLAG("CFLAGS_INTL", "/EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1"); + ADD_FLAG("CFLAGS_INTL", "/std:c++17 /EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1"); } else { WARNING("intl not enabled; libraries and/or headers not found"); }