[libcxx-commits] [PATCH] D58587: Implement P0433: deduction guides for <map>

Marshall Clow via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 28 10:05:14 PDT 2019


mclow.lists added inline comments.


================
Comment at: test/std/containers/associative/multimap/multimap.cons/deduct_const.pass.cpp:123
+    assert(m.get_allocator().get_id() == 45);
+    }
+
----------------
Quuxplusone wrote:
> BTW, if you told me to remove these last two tests (which test `std::multimap<const int&, long>`), I would do so.
> I don't know whether libc++ is supporting reference types here by unhappy accident (i.e. you should just add `static_assert(is_object_v<_Key> && is_object_v<_Tp>)` and be done with it), or by happy accident (i.e. you would be scared to add that `static_assert` at this point but I should remove these two tests anyway), or on purpose (i.e. I should keep these two tests).
> 
> Note that `std::map` cannot support a reference-typed `_Key` because then `try_emplace` would give multiple declaration errors: `const _Key&` and `_Key&&` would be the same type.
I'll look into this.


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D58587





More information about the libcxx-commits mailing list