This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] Mt_alloc: use __bin._M_free[0]


Nathan Myers wrote:

I see no reason to remove "explicit". It is good practice to put it on all constructors except where you have deliberately decided to make an implicit conversion. Somebody might add a (perhaps defaulted) argument, or (on a two-argument constructor) change one of them to defaulted, or just remove it, and forget to finish the job. As it is, it's harmless,
but under minor changes it protects against introducing a bug.


It's too bad that the language has the wrong default. The original
proposal (that the core WG replaced with "explicit") suggested a new default syntax that would have been more natural and convenient.


Thanks for the interesting explanation, Nate!

Ok, I'm not going to touch those two 'explicit'.

"Ubi major"... ;)

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]