[libcxx-commits] [libcxx] [libc++] Add coding guidelines to the docs (PR #117051)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 21 02:25:18 PST 2024


================
@@ -0,0 +1,172 @@
+.. _CodingGuidelines:
+
+========================
+libc++ Coding Guidelines
+========================
+
+Use ``__ugly_names`` for implementation details
+===============================================
+
+Libc++ uses ``__ugly_names`` for implementation details. These names are reserved for implementations, so users may not
+use them in their own applications. When using a name like ``T``, a user may have defined a macro that changes the
+meaning of ``T``. By using ``__ugly_names`` we avoid that problem. Other standard libraries and compilers use these
+names too.
+
+This is partially enforced by the clangh-tidy check ``readability-identifier-naming`` and
----------------
Disservin wrote:

`clangh-tidy`

clangh

https://github.com/llvm/llvm-project/pull/117051


More information about the libcxx-commits mailing list