The installation of a class's vptr cannot be performed without code
being executed. This implies that the constructor of a class cannot be
constexpr.
This fixes PR26506.
Paths
| Differential D16951
[MS ABI] dllimport'd class cannot have constexpr ctors ClosedPublic Authored by majnemer on Feb 6 2016, 6:03 PM.
Details
Diff Detail Event Timelinemajnemer updated this object. Comment Actions Thanks for jumping on this so quickly! Hans can probably just stamp this, but I lack the background, so I must ask:
Comment Actions Cool, lgtm. Maybe we'll have to downgrade this to a warning eventually since cl allows it, but for now let's see how this goes.
This revision is now accepted and ready to land.Feb 8 2016, 9:18 AM
Revision Contents
Diff 47113 include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/DeclCXX.cpp
lib/Sema/SemaDeclCXX.cpp
test/CodeGenCXX/dllimport.cpp
test/SemaCXX/dllimport.cpp
|
cl.exe seems to accept this – do you know how they do that? Do they just silently ignore the constexpr?