Build error in uset.h when `U_SHOW_CPLUSPLUS_HEADER_API` is true but `U_SHOW_CPLUSPLUS_API` is false
General
Other Data
General
Other Data
Description
I was attempting to integrate ICU 76.1 into the Windows port of WebKit and got a build error.
The WebKit code sets U_SHOW_CPLUSPLUS_API to 0 but the code in question is guarded by #if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API while the includes are guarded by just #if U_SHOW_CPLUSPLUS_API
Its unclear if the U_SHOW_CPLUSPLUS_HEADER_API default should be derived from the set value of U_SHOW_CPLUSPLUS_API
too bad that the webkit commit simply turns off the new header-only API. Other than this bug here, there should hopefully be nothing to prevent webkit from using header-only code.
Don Olmstead
October 31, 2024 at 5:13 PM
Thanks ! I didn’t take a stab at it because I wasn’t sure on the default behavior.
To be clear we landed which fixed the build for us.
Markus Scherer
October 31, 2024 at 5:10 PM
Thanks for trying this out and reporting this bug!
It sounds like this should be easy to fix. has written some good unit tests for similar kinds of config options; I might rope him in here.
We do intend for users to be able to use the header-only APIs even if they otherwise don’t use C++ APIs. See
I was attempting to integrate ICU 76.1 into the Windows port of WebKit and got a build error.
The WebKit code sets
U_SHOW_CPLUSPLUS_API
to0
but the code in question is guarded by#if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API
while the includes are guarded by just#if U_SHOW_CPLUSPLUS_API
Its unclear if the
U_SHOW_CPLUSPLUS_HEADER_API
default should be derived from the set value ofU_SHOW_CPLUSPLUS_API