<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 9:16 PM Tom Honermann <<a href="mailto:tom@honermann.net">tom@honermann.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="gmail-m_4253580831376297199moz-cite-prefix">> Unfortunately, if UChar is configured != char16_t, you need
casts or cast helpers for using C APIs from C++ code.<br></div>
<br>
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:<br></div></blockquote><div><br></div><div>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.</div><div><br></div><div>This is what we told our users: <a href="http://site.icu-project.org/download/59#TOC-Pointer-conversion">http://site.icu-project.org/download/59#TOC-Pointer-conversion</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">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.<br></div></blockquote><div><br></div><div>ICU probably would not be able to use such platform-specific methods. We try to keep that to a minimum, and be very portable.</div><div><br></div><div>markus</div></div></div></div>