[Exceptional C++ Style] Re: [Exception C++ Style] Item 15 - Uses andAbuses of Access Rights

James Gunn gunnware at yahoo.com
Tue Dec 14 10:39:29 EST 2004


Hi,

--- Balog Pal <pasa at lib.hu> wrote:
<snip>
> A lighter version of this pickpocket would use
> 
> #define private friend class MyClass; private
> #include "x.h"
> #undef private
> 
> That IMHO leaves less chance for the compiler to
> break anything -- and if 
> done everywhere not even breaks the ODR.  As the
> #define for is considered 
> harmless this should be similar. 

I think if I saw this in production code someone would
be well on their way to losing their job! It shouldn't
be done. Access control is there for a reason. So far,
I can't think of any time when this might be useful.
Apart from that, I wouldn't want to work with
forger's, pickpocket's, cheat's or toothy-smiled
lawyers :-)

Cheers,

James.


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 



More information about the Effective-cpp mailing list