hokein added a comment. Thanks for the review.
In https://reviews.llvm.org/D54745#1303972, @JonasToth wrote: > Does make_unique require the copy constructor if it could move? No, in that case, move constructor will be used. I have updated the patch to include these cases. > And would the same argument apply to the move-constructors as the arguments > are forwarded? > What would happen in the obscure case of a public copy-constructor, but > private move-constructor (not saying it makes sense :)) This depends. The rule is complicated, for some cases it works, for other cases, it won't work. ================ Comment at: test/clang-tidy/modernize-make-unique.cpp:35 +struct NoCopyCtor { + NoCopyCtor(const NoCopyCtor&) = delete; ---------------- JonasToth wrote: > please add a case for the `private` copy-constructor as well. Added more tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54745 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits