[C++ PATCH] ctor privacy
Nathan Sidwell
nathan@acm.org
Mon Jul 17 16:55:00 GMT 2017
While futzing around with ctor lookup I discovered this warning about
overly-private classes.
Originally we'd allow a public copy-ctor to be sufficiently public, but
as the comment says, you need an already-constructed object for that to
work. so this implements that check -- public copy or move ctors do not
make the class sufficiently public.
I didn't implement the further suggested check of ignoring a ctor that
takes an already constructed object -- be it copy ctor or not.
applied to trunk.
nathan
--
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: priv.diff
Type: text/x-patch
Size: 2864 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170717/5063b7c2/attachment.bin>
More information about the Gcc-patches
mailing list