[llvm-bugs] [Bug 37862] call to implicitly-deleted default constructor
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 20 15:10:26 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37862
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |richard-llvm at metafoo.co.uk
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
[class.ctor]p5:
"A defaulted default constructor for class X is defined as deleted if [...] any
non-variant non-static data member of const-qualified type (or array thereof)
with no brace-or-equal-initializer does not have a user-provided default
constructor"
... as clang explains in its diagnostic (which you truncated):
W get() { return W(); } // Line 19
^
<stdin>:4:2: note: explicitly defaulted function was implicitly deleted here
wrap() = default;
^
<stdin>:8:4: note: default constructor of 'wrap<const S>' is implicitly deleted
because field 't' of const-qualified type 'const S' would not be initialized
T t;
^
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180620/612c39ef/attachment.html>
More information about the llvm-bugs
mailing list