labath added a comment.

Using emplacement instead of construction is a good idea, where it makes sense. 
However, I am not convinced that adding constructors to otherwise-trivial 
structures is worth it. These structures are usually trivially copyable and/or 
movable and so an emplacement does not really save much.

And I am definitely sure that the constructors we do add should be taking 
(lvalue) references -- that precludes construction with anything other than an 
lvalue, which is just weird. They also force at least one copy, whereas a 
equivalent (properly written) push_back call could use no copies.

So, I'd just limit this patch to the cases where one does not need to add 
additional constructors to make emplace_back work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87675

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to