C++: use standard nullptr, char16_t, override, final

Description

Discussed in the team meeting today 2021nov10. In C++ header files and implementation code,

  • Change NULL to nullptr

  • Change UChar to char16_t

  • Change U_OVERRIDE to override

  • Change U_FINAL to final

Also change samples. Maybe demos? intltest?

Keep NULL & UChar in C header files and in .c files (cintltst).

Simplify the unicode/umachine.h definition of UChar; remove the “inside the ICU library code” part.
Otherwise, keep NULL & UChar definitions.

Activity

Markus Scherer 
March 21, 2023 at 8:20 PM

Reassigned back to Fredrik so that he gets most of the credit.

Markus Scherer 
March 1, 2023 at 9:29 PM

Now only the very last item here remains, simplifying the unicode/umachine.h definition of UChar, I don’t quite understand what you’re thinking there

I was thinking that once the implementation code no longer mentions UChar we could stop typedef’ing UChar when compiling ICU library code. I tried that, and of course that didn’t work because the library code includes header files that still use UChar (C headers and char16ptr.h).

While looking at that code, I noticed a couple of other anachronisms. Sending pull requests.

Fredrik Roubert 
February 23, 2023 at 5:20 PM

Now only the very last item here remains, simplifying the unicode/umachine.h definition of UChar, I don’t quite understand what you’re thinking there so I’ve now re-assigned this issue back to you so that you can make that change yourself before marking this issue as fixed.

Fixed

Details

Assignee

Reporter

Components

Priority

Time Needed

Hours

Fix versions

Created November 11, 2021 at 1:53 AM
Updated April 17, 2023 at 11:28 AM
Resolved March 21, 2023 at 8:20 PM