[PATCH] D53879: Make libc++'s versioning namespace customizable
Kristina Brooks via Phabricator
reviews at reviews.llvm.org
Tue Oct 30 14:40:32 PDT 2018
kristina added inline comments.
================
Comment at: docs/BuildingLibcxx.rst:373
+ When providing a custom namespace, it's the users responsibility to ensure the name won't cause
+ conflicts with other names defined by libc++, both now and in the future.
+
----------------
EricWF wrote:
> ldionne wrote:
> > The problem with that is that they can't know what names we will want to use. If someone used `__5` today, they would be within their rights because they can't know that we'll want to use it in the future. We have to reserve something for our own usage.
> We can't know what names we'll use in general. But they can be smart about it and aware of the risks.
>
>
It's true but it's one of the things that one may not be aware of until suddenly a new ABI is rolled out that does cause a conflict. It makes sense for `libc++` developers such as yourself to have a very small reserved namespace for "official" versioning changes. If people really want to risk shooting themselves in the foot they can edit the header, but something like `__3` could be a ticking timebomb, and it's not always easy to understand why and it's better than breaking customer's code by accident as it's upstream after all, and it's much easier than write a long explanation on why `__3` is a really bad idea but `__a` is okay.
https://reviews.llvm.org/D53879
More information about the libcxx-commits
mailing list