From 20939183878255075
X-Google-Thread: f78e5,f6130266038a8c4d
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: kuyper@wizard.net (James Kuyper)
Newsgroups: comp.std.c++
Subject: Re: Private Methodes declared outside of the class
Date: Sat, 21 Aug 2004 16:46:37 GMT
Organization: http://groups.google.com
Lines: 25
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <8b42afac.0408200500.48e13c94@posting.google.com>
References: <2oblfaF8nds3U1@uni-berlin.de> <cfvuts$sen$1@news1nwk.SFbay.Sun.COM> <2oih41Fb5pb5U1@uni-berlin.de>
NNTP-Posting-Host: news.news.demon.net
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.demon.co.uk 1093106802 27759 158.152.254.254 (21 Aug 2004 16:46:42 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Sat, 21 Aug 2004 16:46:42 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i7LGkbax000903;
	Sun, 22 Aug 2004 02:46:37 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-NNTP-Posting-Date: Fri, 20 Aug 2004 13:00:06 +0000 (UTC)
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-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:1957

SeeWebsiteForEmail@moderncppdesign.com ("Andrei Alexandrescu (See Website for Email)") wrote in message news:<2oih41Fb5pb5U1@uni-berlin.de>...
> "Steve Clamage" <stephen.clamage@sun.com> wrote in message
> news:cfvuts$sen$1@news1nwk.SFbay.Sun.COM...
>
>> Ben Strasser wrote:
>>
>>> I was wondering why you can not declare private methods outside of
the class declaration?
>>
>>
>> If you could declare member functions outside the class definition,
anyone could hijack the class (for good or bad purposes), or break the
class invariants without anyone knowing.
>
> Well, not if they don't have access to the class' private parts. (I understand this is derailing the discussion from OP's post.)


Then they don't need to be member functions (or even friends).

---
[ 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                       ]



