[Exceptional C++ Style] Exceptional C++ Style - Item 24:

White Wolf wolof at freemail.hu
Thu Jan 27 09:38:40 EST 2005


"Hammond, Peter" <peter.hammond at amsjv.com> írta:
[SNIP]
> > You don't want to do that unless you are sure you won't need
> > to use those version of the Sun C++ compiler which (going
> > against the standard) count the constness of passed-by-value
> > arguments into the function signature - but only while
> > mangling the name.  They accept your (header non-const,
> > impl. const) function, it compiles, but it cannot link, as
> > the callers (who see the header only) will refer to the
> > function with a different name.
> > 
> > WW aka Attila
> >
> 
> Ouch. We have many problems caused by the need to support
old Sun and other
> compilers. I'll not be introducing this guideline then.
Thanks for the
> warning.

As I recall this error is in the new(er) compilers.  I did
not check if it was in the very latest one, but 6 update 2
had it.  And I think that the 5 series did not.  I have
never used 4.2 (or 4 update 2).

Attila aka WW




More information about the Effective-cpp mailing list