Build error in uset.h when `U_SHOW_CPLUSPLUS_HEADER_API` is true but `U_SHOW_CPLUSPLUS_API` is false

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

Activity

Show:

Markus Scherer 
February 6, 2025 at 4:26 PM

over to you for the UCollator wrapper

Markus Scherer 
November 12, 2024 at 10:21 PM

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

Fixed

Details

Assignee

Reporter

Components

Priority

Fix versions

Created October 25, 2024 at 10:44 PM
Updated February 7, 2025 at 7:15 PM
Resolved February 7, 2025 at 7:15 PM