Hello,

I was trying to see how Clang in -std=c++98 would handle libc++ and ran into
some trouble. GCC enables a substantial amount of C++ functionality when
inside of system headers in addition to suppressing warnings. Clang however
only suppresses warnings and relies on 0x features to be enabled with
ExtWarns in 98 mode in order for them to work in system headers. The end
result is that while Clang is fine with the variadic templates, it barfs on
several other constructs. One is the use of 'vector<vector<int>>'-style
closing angle brackets. I've attached a patch, constructed with our fixit
rewriter, that makes all of those contain the mandated space. Chris
indicated on IRC that this should likely just be avoided in libc++.

The other major blocker is that R-value references aren't an extension but
are used heavily in libc++. Should these also become an extension, or should
we add more robust survival tactics in system headers much as GCC does?

One more small blocker was the use of default template parameter arguments
in function templates. Same question as to how best to proceed.

Thanks,
-Chandler

Attachment: fix_close_angle_angle.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to