[RFC] std::string(0);

Nathan Myers ncm-nospam@cantrip.org
Fri Jun 11 19:26:00 GMT 2004


On Fri, Jun 11, 2004 at 08:27:35PM +0200, Paolo Carlini wrote:
> Nathan Myers wrote:
> 
> >c) Report the error if the compiler was not invoked "-pedantic".
>
> Assuming that this actually implementable with a reasonable amount of
> work, seems *in general* an original and interesting proposal: perhaps
> I'm wrong but in the greatest majority of the cases -pedantic is
> supposed to spill *more* errors, not less!

It really means "never mind what makes sense, do what the standard says." 
In this case, the standard says to ignore the error, but it makes better
sense to catch it. 

The overloading trick would work, but you would need access to a 
macro defined if "-pedantic" (unless there was some hackishly 
exploitable semantic difference between pedantic and regular modes;
in the old days, it would be worth checking, but not any more).
Of course there is no such macro.

Nathan Myers
ncm-nospam@cantrip.org



More information about the Libstdc++ mailing list