ICU4C: U_NAMESPACE_BEGIN and similar macros should be conditional on U_SHOW_CPLUSPLUS_API

Description

Link to the API change report in Markdown:
https://github.com/unicode-org/icu/blob/maint/maint-65/icu4c/APIChangeReport.md
(Thanks to Steven for the nice Markdown version).

This is a follow up ticket from the discussion/comments on PR 808: https://github.com/unicode-org/icu/pull/808#discussion_r321947773

When the API change report was generated for ICU 65 RC, the macros: U_NAMESPACE_BEGIN, U_NAMESPACE_QUALIFIER and U_NAMESPACE_END showed up as disappeared and/or removed.

This was due to the following change: which was originally intended to clean up C++ macros from being present in C headers.

The comment from Steven on the PR was that it might be necessary to define __cplusplus=1 in the Doxygen config file for the API change report.

In ICU 65 RC the macros are only defined if __cplusplus is defined. Otherwise they don't exist.

In previous versions of ICU, the macros were defined to nothing/empty if __cplusplus wasn't defined.

We may want to keep the macros being defined to nothing/empty, but with the additional condition of U_SHOW_CPLUSPLUS_API being defined as well, in order to support users of ICU that are using a C++ compiler but only want to use C APIs.

Status

Assignee

Unassigned

Reporter

Jeff Genovy

Labels

None

Reviewer

None

Time Needed

None

Start date

None

Components

Priority

TBD