[libcxx-commits] [PATCH] D156052: [libc++][doc] Improves contribution page.
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 23 09:37:17 PDT 2023
philnik added inline comments.
================
Comment at: libcxx/docs/Contributing.rst:44
+
+In libc++, like all standard libraries, we use ``__ugly_names``. These
+names are reserved for implementations, so users may not use them in
----------------
Maybe we should mention that we use clang-tidy for some of these things? I think that is good motivation to enable it in your IDE.
================
Comment at: libcxx/docs/Contributing.rst:51
+``libcxx/test/libcxx/reserved_macro_names.gen.py``
+contains the list of reserved names that are can't be used.
+
----------------
tschuett wrote:
> `are can't` reads odd.
================
Comment at: libcxx/docs/Contributing.rst:53-54
+
+Function calls in the standard library that use types provided by the
+user are susceptible to ADL. This means calling ``move(UserType)`` may
+not call ``std::move``. Therefore function calls are using qualified
----------------
This applies to all types, not just user-provided types. Maybe something like "Unqualified function calls result in ADL"? Also, linking to https://en.cppreference.com/w/cpp/language/adl would be nice, since most people aren't super familiar with ADL.
================
Comment at: libcxx/docs/Contributing.rst:59-62
+Function overloading also applies to operators. Using ``&user_object``
+may call a user defined ``operator&``. Use ``std::addressof`` instead.
+Similar for ``operator,``. When using the ``,`` make sure to cast the
+result to ``void``. For example:
----------------
I'd just avoid `operator,` altogether if possible. It makes the code almost always easier to read.
================
Comment at: libcxx/docs/Contributing.rst:75
+
+- ``_VSTD::foo`` is no longer used in new code use ``std::foo`` instead.
+- ``_LIBCPP_INLINE_VISIBILITY`` is no longer used in new code use
----------------
================
Comment at: libcxx/docs/Contributing.rst:147-149
+ for the usage of C++ library and language features. It's easier to
+ read than the C++ Standard. This reference lacks details needed to
+ properly implement library features.
----------------
================
Comment at: libcxx/docs/Contributing.rst:150
+ properly implement library features.
+
+
----------------
https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations would also be quite useful I think.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156052/new/
https://reviews.llvm.org/D156052
More information about the libcxx-commits
mailing list