[cfe-commits] [PATCH] Fixing constant default initialization with explicitly defaulted constructors

Aaron Ballman aaron at aaronballman.com
Tue Jul 31 15:25:49 PDT 2012


This patch addresses PR13492 and PR13216, where explicitly defaulted
constructors were allowed during default initialization of a constant.
 For instance:

  struct B {
    B() = default;
  };

  void f() {
    const B b;  // Should error
  }

It did catch some problems with previous test cases that I've also corrected.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: defaulted.patch
Type: application/octet-stream
Size: 3230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120731/b37532f5/attachment.obj>


More information about the cfe-commits mailing list