http://llvm.org/bugs/show_bug.cgi?id=17694
Richard Smith <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |LATER --- Comment #1 from Richard Smith <[email protected]> --- It's helpful to provide the diagnostic when reporting that code is rejected. Here, Clang says: <stdin>:9:15: error: default initialization of an object of const type 'const A' requires a user-provided default constructor constexpr A a; ^ ... which is correct. g++ accepts this because it has speculatively implemented a resolution to this core issue: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253 In Clang, we're waiting for the issue to actually be resolved before we take a direction on it. Note that 'constexpr' is entirely irrelevant here; the same thing happens with: class A { public: A() = default; }; int main(int argc, char** argv) { const A a; } In either case, g++ also rejects if you add any data member to 'A'. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
