From -109665355912950015
X-Google-Thread: f78e5,6f042a6ff823c6a0,start
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: stkim@yujinrobot.com ("Kim, Seungtai")
Newsgroups: comp.std.c++
Subject: Relation of enermy(anti-friend)
Date: Thu, 26 Aug 2004 19:26:13 GMT
Organization: Korea Research Environment Open Network
Lines: 48
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <cgk8od$vai$1@news.kreonet.re.kr>
NNTP-Posting-Host: news.news.demon.net
X-Trace: news.demon.co.uk 1093548381 26788 158.152.254.254 (26 Aug 2004 19:26:21 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 26 Aug 2004 19:26:21 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,PRIORITY_NO_NAME 
	autolearn=no version=2.64-mulga_r1
X-MSMail-Priority: Normal
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i7QJQDZr010892;
	Fri, 27 Aug 2004 05:26:13 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-NNTP-Posting-Date: Thu, 26 Aug 2004 08:58:53 +0000 (UTC)
X-Spam-Level: 
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-Newsgroups: comp.std.c++
Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!news2.telebyte.nl!news.amigo.co.uk!news.clara.net!wagner.news.clara.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
Xref: g2news1.google.com comp.std.c++:2200

May be it just funny question.

The friend makes that a function or class can access to
invisible memebers with particular right. It works well for
operator <<, >>, etc.

In this point, the question arises. Why there is no enemy relation.
Enermy relation means that a class or a function even can not see
the public member of a enermy class if they are tied with enermy
relation.

For example,

    class X;
    class Y;

    class X
    {
        enermy class Y;

        public:
            X ( Y & ); // Ok: Y is normal relation class.
    };

    class Y
    {
        public:
            Y( X & ) // Error: X designates the Y to enermy.
    };


I thinks that this kinds of relation are easily arised in real situation.

Is there already consideration occured? If not, why this relation
dose not considered in the Standard or...

Any comments. Thanks.

-- 
S Kim <stkim@yujinrobot.com>


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



