ICU4C: Guard C++ public headers with C_SHOW_CPLUSPLUS_API


Continue the discussion at ICU-20530, I provide a major cleanup without functionality change for icu public headers.

1. Remove all trailing spaces
2. Make the once macro consistent and unique and at format _U_HEADER_H_
3. Align file file prologue
4. Guard C++ using C_SHOW_CPLUSPLUS_API to allow include in C


Jeff Genovy
May 2, 2019, 5:24 PM

I’m going to update the title of the ticket to denote that this is just about guarding the C++ headers with the C_SHOW_CPLUSPLUS_API macro, and the hdrtest changes.


Jeff Genovy
April 30, 2019, 9:05 PM

Hello , thank you for filing this ticket and for the PR as well.

Based on discussion with other ICU-TC members, the only accepted changes to the public headers would be for guarding C++ using the macro C_SHOW_CPLUSPLUS_API, the changes to the hdrtst, and the trailing white-space fixes.

The opinion of other TC members was that the additional clean-up changes in PR#638 cause too much churn and shouldn't be done at this time.

Shane Carr
April 30, 2019, 12:35 AM

Related: ICU-13794, which has some suggestions for changes to the number_* file macro wrappers.

Alon Bar-Lev
April 27, 2019, 7:54 PM

as promised bit love for the public headers, please review this long cleanup patch. I will appreciate quick review as these kind of patches tend to be very hard to rebase.



Jeff Genovy


Alon Bar-Lev




Fix versions