[libcxx-commits] [PATCH] D58879: Implement uses-allocator (P0591R4)

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 8 09:10:10 PDT 2019


zoecarver marked an inline comment as done.
zoecarver added inline comments.


================
Comment at: include/memory:5820
+{
+    return __uses_allocator_construction_args_impl<_Tp>(
+        __is_pair<_Tp>{}, // TODO: vstd::is_pair
----------------
Quuxplusone wrote:
> Nit: I believe this needs a `_VSTD::` to prevent ADL in some complicated case involving `std::pair<int, std::vector<Incomplete>*>` that I don't 100% remember. (Something like it's going to try to look for friends of `Incomplete` because `Incomplete` is an associated entity of that `pair` type.) It would be interesting to write a unit test for this.
> Rule of thumb, every function call needs a `_VSTD::` to prevent ADL for _some_ reason or other. :)
Do you mean `__uses_allocator_construction_args_impl` or `is_pair`? 


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

https://reviews.llvm.org/D58879





More information about the libcxx-commits mailing list