C++ Logo


Advanced search

Re: [SG16-Unicode] Draft SG16 direction paper

From: Markus Scherer <markus.icu_at_[hidden]>
Date: Tue, 16 Oct 2018 22:42:45 -0700
On Tue, Oct 16, 2018 at 9:16 PM Tom Honermann <tom_at_[hidden]> wrote:

> > Unfortunately, if UChar is configured != char16_t, you need casts or
> cast helpers for using C APIs from C++ code.
> The question is, effectively, whether consideration has been given to
> providing cast helpers in a manner similar to how standard C++ provides
> access to standard C functions; e.g., by exposing cast helpers in a C++
> namespace. More concretely, whether something like the following has been
> considered:

We haven't considered that. I don't think any of us thought of it -- but it
would be a lot of work to add/document/test hundreds of duplicate functions.

This is what we told our users:

Noting that there are methods on at least some platforms that avoid having
> to actually write a definition for the namespace scoped signature when the
> functions have compatible calling conventions.

ICU probably would not be able to use such platform-specific methods. We
try to keep that to a minimum, and be very portable.


Received on 2018-10-17 07:43:00