kadircet added a comment.

there's actually a slight difference between an inline defaulted special member 
function and an out-of-line defaulted one. the latter makes the special member 
"user-defined" which might cause various headaches (e.g. type is no longer 
"trivial"). i don't think we should make it easy for people to change 
trivialness of types (especially considering our experience with people 
thinking anything that comes from the lightbulb is a way to improve your code). 
on a side node, this is less of an issue in the scenario you described (i.e. 
when the destructor is virtual, as it already means type is non-trivial).

so if you feel like this is really useful, i guess we can change the scope a 
little to apply to all special members, but only when type is no longer 
trivial. WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147808

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

Reply via email to