[PATCH] D55517: Remove `_VSTD`

Louis Dionne via Phabricator reviews at reviews.llvm.org
Mon Dec 10 12:04:33 PST 2018


ldionne added a comment.

In D55517#1325952 <https://reviews.llvm.org/D55517#1325952>, @mclow.lists wrote:

> We have two different namespaces in libc++.
>
> We have `std`, which is opened by `namespace std {`, and referred to using `std::`.
>  We have `std::__1`, which is opened by `_LIBCPP_BEGIN_NAMESPACE_STD`, and is referred to using `_VSTD`.
>  Some things live in former, and some (most) in the latter.
>
> They're **different**, and the fact that `std::` will find things in `std::__1` doesn't change that.


I agree they're technically different namespaces. However, I can't think of a situation where we want to refer to a function in something else than `<the-namespace-of-the-current-ABI-version-or-the-unversionned-namespace>`.

Also, I'm not sure code up to now has been written with that subtlety in mind, and as a result it's unclear to me whether doing any change that relies on `_VSTD` being used in precisely that way would work. In other words, it's quite possible that some uses of `_VSTD::` right now should actually be using `std::`, and some uses of `std::` should be using `_VSTD::`, so making a distinction between the two in the future might not work as intended. If we want to do this, I believe we should survey existing uses of `std::` and `_VSTD::` to make sure they're as expected.


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55517/new/

https://reviews.llvm.org/D55517





More information about the libcxx-commits mailing list