C++ PATCH: PR 23293

Kai Henningsen kaih@khms.westfalen.de
Thu Oct 20 04:28:00 GMT 2005


mark@codesourcery.com (Mark Mitchell)  wrote on 19.10.05 in <4356766D.2060806@codesourcery.com>:

> David Abrahams wrote:
>
> > Still, I bet the only reason most users know about basic_string is
> > that they see it in error messages.  It would be better to show most
> > people
> >
> >   std::string.
>
> Sure, I hear you.
>
> If you build a consensus that we should go back to the previous bad
> diagnostics (as in the PRs we've looked at), or to some new compromise,
> I'm not going to stand in your way!  I just don't think it's an entirely
> winnable game, given our technology.

It seems to me as if it would be a significant win, if slightly ugly, if  
typedefs in std:: would be excepted here, and possibly those at global  
level (not including more nested typedefs in either case).

In most programs, that will be the vast majority of what makes things  
long.

I don't know about the effect on template metaprogramming, but for more  
normal applications this seems like a possible compromise.

Hmm ... another idea is to expand that to (or replace it with) typedefs in  
the exact same namespace or class as the outermost template name, or  
possibly the innermost enclosing one - might need some experiments here to  
determine what works better. That way some user code could also take  
advantage of it, and the names in question should still not be all that  
wildly strange.

I assume that is-in-same-namespace or is-in-global/std-namespace are  
easily testable predicates, of course - if not, this wouldn't work well.

MfG Kai



More information about the Gcc-patches mailing list