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

Nathan Myers ncm-nospam@cantrip.org
Sun May 16 16:22:00 GMT 2004


On Sun, May 16, 2004 at 04:56:22PM +0200, Gabriel Dos Reis wrote:
> Paolo Carlini <pcarlini@suse.de> writes:
> 
> | -	explicit _Tune()
> | +	explicit
> | +	_Tune()
> 
> I'm confused by what explicit is doing here.
> [...] 
> Although this patch did not introduce them, it could get rid of them
> since it is touching them.

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.

Nathan Myers
ncm@cantrip.org



More information about the Libstdc++ mailing list