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 <ncm-nospam@cantrip.org> writes:

| 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".

Its uses in these specific cases are unnecessary confusing.
"explicit" means "this is not a converting constructor".  The message
it sends to the reader/reviewer/maintainer  is to be careful about the
default careful.  (And my first reaction was to look for what we did
not want to convert from, just to find out that, either there is no
argument, so "explicit" is pointless, or there are too many arguments
with no default and we can't be conerting anyway).  That is
distraction, obfuscation.

[...]

|  Somebody might add a (perhaps defaulted) argument, 

Nobdoy adds a parameter without consideration whether the
constructor is converting or not.  No V3 maintainer adds a 
constructor carelesslly, and I see no reason to start encouragin
that. 

[...]

| It's too bad that the language has the wrong default. 

but using "explicit" thoughless that way just dilutes the message it
is conveying. It is the wrong defult use.

-- Gaby


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