[cfe-dev] Non Static Member Initialization and deleted copy constructor

Richard Smith richard at metafoo.co.uk
Thu Jul 26 14:34:56 PDT 2012


On Thu, Jul 26, 2012 at 2:23 PM, Steve Ramsey <clang at lucena.com> wrote:

> On Jul 26, 2012, at 1:25 PM, Richard Smith wrote:
> > Ouch.
> >
> > This isn't restricted to non-static member initializers, it's a problem
> with the way we instantiate direct-list-initialization in general:
>
> Actually, changing both initializations to assignments (“= 0”) generates
> the same error (“'std::atomic<int>' invokes deleted constructor”), but for
> both the class and the template class versions.


Sure, but those cases are actually ill-formed. The problem is that the copy
constructor is deleted, but direct initialization isn't supposed to call
the copy constructor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120726/8625657a/attachment.html>


More information about the cfe-dev mailing list