On Mon, Jun 23, 2014 at 4:47 AM, Alexander Kornienko <[email protected]> wrote: > +Matt, who requested this feature. > > On Sun, Jun 22, 2014 at 9:13 AM, James Dennett <[email protected]> > wrote: >> >> On Sun, Jun 22, 2014 at 3:00 AM, David Blaikie <[email protected]> wrote: >>> >>> Fwiw, if I'm not mistaken, explicit on more - than - one - arg actors >>> does >>> have some meaning in c++11. It means you can't construct from a braced >>> init >>> list. >> >> >> IIRC: More specifically, you can't use copy-list-initialization; direct >> initialization from a braced init list is allowed for an explicit >> constructor. >> >> The essence is that it takes some thought before removing explicit from a >> constructor, more so than in C++98. > > > Thanks for noting. This may be an interesting argument in whether we should > remove "explicit" on multiple-argument constructors or not. I'm not sure > though, how useful the ability to disallow direct initialization from a > braced init list is. It's rather obvious what harm can an implicit call to a > single-argument constructor cause, but with braced init lists a mistake is > much less likely, imo. > > Matt, what do you think about this?
I did not know that 'explicit' had an expanded meaning in C++11. I bet that most cases in our codebase where 'explicit' is present on a multi-argument ctor are due to arguments being added to a one-argument ctor, rather than actively trying to avoid copy-list-initialization. -Matt _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
