From 7229610544146331997
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2b0387157d35b1a9
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1995-02-01 16:23:11 PST
Newsgroups: comp.std.c++
Path: nntp.gmd.de!Germany.EU.net!wizard.pn.com!satisfied.elf.com!news.mathworks.com!hookup!swrinde!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!msunews!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!news
From: maxtal@physics.su.OZ.AU (John Max Skaller)
Subject: Re: Need advice on developing classes
Message-ID: <D3CJqo.so@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: physics.su.oz.au
Organization: School of Physics, University of Sydney, Australia
References: <D2ByGp.E4A@seas.ucla.edu> <1995Jan13.155558.4483@rcmcon.com> <790640862snz@thone.demon.co.uk>
Date: Thu, 2 Feb 1995 00:23:11 GMT
Lines: 45

In article <790640862snz@thone.demon.co.uk> andys@thone.demon.co.uk writes:
>In article <1995Jan13.155558.4483@rcmcon.com>
>           rmartin@rcmcon.com "Robert Martin" writes:
>
>[snip]
>> 
>> Friendship cannot be stolen, only given. Its use is
>> to expose privates to a priviledged few, so that those privates do not
>> have to exposed to the world.
>> 
>how about:
>
>"x.h"
>class X {
>   static int si_XVal;
>   friend void TheFriend();
>};
>
>"file1.cpp"
>static void TheFriend();
>#include "x.h"
>
>static void TheFriend()
>{
> si_XVal = 0;
>}
>
>"file2.cpp"
>static void TheFriend();
>#include "x.h"

	Undiagnosed violation of the One Definition Rule.
A non-local class name has two inequivalent definitions
(there are _two_ functions "TheFriend", so the class
definitions in file1.cpp and file2.cpp are not equivalent)

	BTW: don't look for the rule in the ARM or WP.
It is in my paper on the ODR, which has not yet been
considered by the committee.

--
        JOHN (MAX) SKALLER,         INTERNET:maxtal@suphys.physics.su.oz.au
	Maxtal Pty Ltd,		    
        81A Glebe Point Rd, GLEBE   Mem: SA IT/9/22,SC22/WG21 
        NSW 2037, AUSTRALIA	    Phone: 61-2-566-2189


