[cfe-dev] [libc++] FYI: FreeBSD libc++ status

Karen Shaeffer shaeffer at neuralscape.com
Wed Jul 17 11:51:10 PDT 2013


On Wed, Jul 17, 2013 at 03:43:55PM +0100, David Chisnall wrote:
> On 17 Jul 2013, at 15:14, Howard Hinnant <hhinnant at apple.com> wrote:
> 
> > I've wondered if libc++'s locale ought to be built on ICU instead of xlocale.  I don't know the answer to that question.
> 
> Definitely not.  ICU is a huge dependency, has a relatively rapidly changing API and does vastly more than is required.  The C++11 locale APIs were designed to be easy to implement on top of the POSIX2008 Locale APIs, (which were originally xlocale on OS X).  We just didn't do so in the most efficient way - the locale_t is already reference counted and so we don't need to do as much copying as we do for the facets.
> 
> > I've hesitated in adding <cuchar> because I can't test it.  However if you can add and test it, that would be a welcome addition.
> 
> My version of the draft spec says almost nothing about this header, other than it exists.
> 
> David

Hi David,
Yes, libicu is a very significant dependency, but it all just works for every locale and every
facet. I can only speak about the g++ c++11 libstdc++-4.7.2 locale support. It has serious
limitations. The boost::locale documentation discusses a few of them.

I suggest folks ought to examine the boost::locale implementation. It is just a wrapper around
libicu. I use it and am quite pleased. I get all the advantages of libicu without ever needing
to maintain any of it. while it might not be appropriate for clang, I do believe it is an
excellent example of how clang might develop it's own wrapper around libicu, alleviating any
need to maintain it. Just a suggestion. Not my issue.

enjoy,
Karen
-- 
Karen Shaeffer
Neuralscape, Mountain View, CA 94040



More information about the cfe-dev mailing list