Re: friend operator << overload ambiguity error
From: Jerry Coffin (jcoffin_at_taeus.com)
Date: 01/17/05
- Next message: puzzlecracker: "abstract class"
- Previous message: Jerry Coffin: "Re: i am a vc++ beginner ,which books is suitable to me?"
- In reply to: Dave Moore: "Re: friend operator << overload ambiguity error"
- Next in thread: Dave Moore: "Re: friend operator << overload ambiguity error"
- Reply: Dave Moore: "Re: friend operator << overload ambiguity error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Jan 2005 09:05:22 -0800
[ ... ]
> > class Thing;
> > namespace std {
>
> This is a big no-no ... we users are not allowed to "pollute" the std
> namespace. That is the whole point of calling it std, meaning
standard. As
> soon as you start adding names to it, it will behave differently for
you
> than for the rest of the world, and so it is then by definition not
standard
> anymore.
This isn't entirely true -- the standard gives explicit permission for
users to add names to namespace std under the right circumstances. I
don't have my copy of the standard here at work to give all the
details, but if memory serves, overloading on a UDF fulfills one of the
major requirements.
--
Later,
Jerry.
- Next message: puzzlecracker: "abstract class"
- Previous message: Jerry Coffin: "Re: i am a vc++ beginner ,which books is suitable to me?"
- In reply to: Dave Moore: "Re: friend operator << overload ambiguity error"
- Next in thread: Dave Moore: "Re: friend operator << overload ambiguity error"
- Reply: Dave Moore: "Re: friend operator << overload ambiguity error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|