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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 7 09:59:48 PDT 2019


Quuxplusone added inline comments.


================
Comment at: include/memory:5820
+{
+    return __uses_allocator_construction_args_impl<_Tp>(
+        __is_pair<_Tp>{}, // TODO: vstd::is_pair
----------------
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. :)


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

https://reviews.llvm.org/D58879





More information about the libcxx-commits mailing list