dblaikie added a comment. > CRTP was my first implementation, however, I discarded it as more bug-prone. > Virtual Clone function at the interface is so common that, I believe, > everyone knows it must be overridden by a new derived class. The necessity of > inheriting from base_clone_helper is not so obvious.
I would've thought it'd be pretty easy to accidentally miss either of these - I think the CRTP helper ensures consistency of implementation (harder to accidentally slice/copy the wrong type/etc. But I'm not a code owner/major contributor to lldb specifically, so probably more up to other developers who are. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96817/new/ https://reviews.llvm.org/D96817 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits