[libcxx-commits] [libcxx] [libc++] Document that backported language features should be used (PR #176993)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 26 09:59:04 PST 2026
================
@@ -104,12 +104,22 @@ provide alternative spellings for their attributes, so these should be avoided i
This is enforced by the clang-tidy check ``libcpp-uglify-attributes``.
-Use C++11 extensions in C++03 code if they simplify the code
-============================================================
-
-libc++ supports the C++98/03 mode only with the Clang compiler. Clang provides many C++11 features
-in C++03, making it possible to write a lot of code in a simpler way than if we were restricted to C++03 features.
-Some use of extensions is even mandatory, since libc++ supports move semantics in C++03.
+Use extensions if they simplify the code
+========================================
+
+libc++ only supports recent versions Clang and GCC, which allows us to make use of extensions in the code base if both
+compilers support them. The only language extensions that should be used liberally throughout the library are features
----------------
ldionne wrote:
> The only language extensions that should be used liberally throughout
This sentence reads a bit weird to me.
https://github.com/llvm/llvm-project/pull/176993
More information about the libcxx-commits
mailing list