[cfe-dev] on libc++ extensions and slist
Christopher Jefferson
chris at bubblescope.net
Mon Aug 1 05:57:37 PDT 2011
On 31 Jul 2011, at 02:31, Howard Hinnant wrote:
> In existing C++03 standard libraries there are a ton of extensions. Some good, some not so good. Some of the better ones have morphed into official C++11 libraries. However, I can't think of a single example where an extension has been standardized unchanged from its extension form. There is good reason for this.
>
> I'm going to pick on slist. But my argument is meant to be broader than slist.
> …
>
I have converted some fairly substantial code bases at my work to run on clang, then libc++, then c++0x. I also did quite a lot of the work involved in getting boost to run on clang/libc++/c++0x.
On any sizeable code base, each of these changes, particularly mapping to clang and then libc++, will take some work. This work is mostly because other compilers have been far too lax in the past.
I want to see libc++ and clang++ keep their neatness, and not start introducing huge number of patches to get around old standards-incompatable code.
This certainly seems to be the route that clang++ itself is sticking to, my experience is almost any piece of sizeable c++ code will fail to compile when first given to clang++ (although the error messages are very helpful in showing how to fix it).
However, a written migration strategy, covering issues which are likely to come up, would be useful. I'm not sure what the best way to present such a document would be (in svn, on a wiki for easier editing?)
In short: Tell people how to fix their code, don't help them patch around it silently. They are going to have pain switching to clang/libc++/0x whatever you do.
Chris
More information about the cfe-dev
mailing list