[PATCH] D25654: [Sema] Don't perform aggregate initialization for types with explicit constructors

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 16 10:26:23 PDT 2016


rsmith added a comment.

Please also add a test to test/CXX/drs/dr15xx.cpp for core issue 1518, which this paper was resolving.



================
Comment at: lib/AST/DeclCXX.cpp:564
+    // C++1z [dcl.init.aggr]p1:
+    //  - no user-provided, explicit, or inherited constructors,
+    if (getASTContext().getLangOpts().CPlusPlus1z && Constructor->isExplicit())
----------------
Do we correctly handle the "or inherited" part? I'd also like to find out whether core intended for this issue to be treated as a DR or not (if so, this should apply all the way back to C++11).


https://reviews.llvm.org/D25654





More information about the cfe-commits mailing list