220 7586 <1CD4DBEC-8081-42AD-861A-FF87D7E55606@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Marshall Clow <mclow.lists@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Fixing the private method issue
Date: Mon, 4 Nov 2013 06:01:40 -0800
Lines: 96
Approved: news@gmane.org
Message-ID: <1CD4DBEC-8081-42AD-861A-FF87D7E55606@gmail.com>
References: <d5cd9fa5-ac2f-465b-b92d-cf2a35607245@isocpp.org> <8d5f90be-ed45-4b42-9ddd-d6e2497c8166@isocpp.org> <CAPBZbvzB7PX9z=yRc_zG05hzeqZtUPAX6tVUT_DPdZ0ZXGXgww@mail.gmail.com> <997f6a58-e8ff-4656-b7be-7714dd2a7240@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_6EAAC587-C2CC-46E4-8DBF-28E71BCBA705"
X-Trace: ger.gmane.org 1383573709 21456 80.91.229.3 (4 Nov 2013 14:01:49 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 4 Nov 2013 14:01:49 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDHIXP53REBRBSOR32JQKGQEJJ4JBIQ@isocpp.org Mon Nov 04 15:01:54 2013
Return-path: <std-proposals+bncBDHIXP53REBRBSOR32JQKGQEJJ4JBIQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f200.google.com ([209.85.223.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDHIXP53REBRBSOR32JQKGQEJJ4JBIQ@isocpp.org>)
	id 1VdKiy-0004BF-Tq
	for gclcip-std-proposals@m.gmane.org; Mon, 04 Nov 2013 15:01:49 +0100
Original-Received: by mail-ie0-f200.google.com with SMTP id aq17sf21554080iec.7
        for <gclcip-std-proposals@m.gmane.org>; Mon, 04 Nov 2013 06:01:47 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:mime-version:subject:date
         :references:to:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=YJDTrdszTAdQyx38Mi3fpunpE0A0NHzIRVu9yHHkH64=;
        b=EOJiwC4eASznervRl6FyGDJeZ4UpWLRQDS15P/TqiS4vOE49j0tTx54x+FWqTBEaBT
         zfvKZMcwONVrss02hIla2A9wxGwBdTP+7hH6c/wLSLBRst670QkMh59qFMSzrKBHpQXo
         hA98ssMR3fWOU7KNMzeA/5bqE95da4Trqrnzpo7TwpwL3OVf8G6Y59d2a2+//aFsW/Cc
         t8aY/nnxbr9xmnWWKAtPAh4HgxIpx8S7RkYyGBlKECnh9ENGM3iqfw3lLBRaVe4U7C86
         6/CDzy6A2meUIQxui/ssiPqnDcFsD1i506iInFXHxBiyFFPA7O8/SHhY5uVyxyLAUsuz
         TLKA==
X-Gm-Message-State: ALoCoQlxAQISEv/JHfObNj1eX8QbAUEkNOcoHV4EvJPIaRdoJ1JUtjlWtkQfMYF6vzeeOpvkE3Z6
X-Received: by 10.182.111.134 with SMTP id ii6mr5026457obb.38.1383573707819;
        Mon, 04 Nov 2013 06:01:47 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.110.69 with SMTP id hy5ls1428622igb.31.canary; Mon, 04 Nov
 2013 06:01:45 -0800 (PST)
X-Received: by 10.69.0.201 with SMTP id ba9mr1182231pbd.184.1383573705266;
        Mon, 04 Nov 2013 06:01:45 -0800 (PST)
Original-Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [2607:f8b0:400e:c03::236])
        by mx.google.com with ESMTPS id qk4si10889127pac.148.2013.11.04.06.01.44
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 04 Nov 2013 06:01:44 -0800 (PST)
Received-SPF: pass (google.com: domain of mclow.lists@gmail.com designates 2607:f8b0:400e:c03::236 as permitted sender) client-ip=2607:f8b0:400e:c03::236;
Original-Received: by mail-pa0-f54.google.com with SMTP id fa1so7002244pad.13
        for <std-proposals@isocpp.org>; Mon, 04 Nov 2013 06:01:44 -0800 (PST)
X-Received: by 10.66.118.233 with SMTP id kp9mr1094155pab.182.1383573704157;
        Mon, 04 Nov 2013 06:01:44 -0800 (PST)
Original-Received: from eyefive.qualcomm.com ([129.46.76.28])
        by mx.google.com with ESMTPSA id xs1sm33336049pac.7.2013.11.04.06.01.42
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 04 Nov 2013 06:01:43 -0800 (PST)
In-Reply-To: <997f6a58-e8ff-4656-b7be-7714dd2a7240@isocpp.org>
X-Mailer: Apple Mail (2.1510)
X-Original-Sender: mclow.lists@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of mclow.lists@gmail.com designates 2607:f8b0:400e:c03::236 as
 permitted sender) smtp.mail=mclow.lists@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7586
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7586>

--Apple-Mail=_6EAAC587-C2CC-46E4-8DBF-28E71BCBA705
Content-Type: text/plain; charset=ISO-8859-1


On Nov 4, 2013, at 5:18 AM, Olaf van der Spek <olafvdspek@gmail.com> wrote:

> 
> 
> On Monday, November 4, 2013 2:05:15 AM UTC+1, Billy O'Neal wrote:
> Private member *data* does need to be declared in the class definition so that callers know what size to lay out for the object. Private member *functions* do not.
> 
> Not entirely true. In general, callers don't need to know the layout. The layout is (only?) required when accessing data members, the size is only required when creating an object on the stack.

Counterexample:
	struct Foo;
	Foo * f = new Foo;

This calls operator new ( size_t ) to allocate memory.
How much memory should be allocated?


> Not requiring private data members in the header would be nice too IMO.

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists@gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--Apple-Mail=_6EAAC587-C2CC-46E4-8DBF-28E71BCBA705
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Diso-8859-1"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mo=
de: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 4,=
 2013, at 5:18 AM, Olaf van der Spek &lt;<a href=3D"mailto:olafvdspek@gmail=
..com">olafvdspek@gmail.com</a>&gt; wrote:</div><br class=3D"Apple-interchan=
ge-newline"><blockquote type=3D"cite"><div dir=3D"ltr"><br><br>On Monday, N=
ovember 4, 2013 2:05:15 AM UTC+1, Billy O'Neal wrote:<blockquote class=3D"g=
mail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc sol=
id;padding-left: 1ex;"><div dir=3D"ltr">Private member *data* does need to =
be declared in the class definition so that callers know what size to lay o=
ut for the object. Private member *functions* do not.</div><div><br></div><=
/blockquote><div>Not entirely true. In general, callers don't need to know =
the layout. The layout is (only?) required when accessing data members, the=
 size is only required when creating an object on the stack.</div></div></b=
lockquote><div><br></div>Counterexample:</div><div><span class=3D"Apple-tab=
-span" style=3D"white-space:pre">	</span>struct Foo;</div><div><span class=
=3D"Apple-tab-span" style=3D"white-space:pre">	</span>Foo * f =3D new Foo;<=
/div><div><br></div><div>This calls operator new ( size_t ) to allocate mem=
ory.</div><div>How much memory should be allocated?</div><div><br></div><di=
v><br></div><div><blockquote type=3D"cite"><div dir=3D"ltr"><div>Not requir=
ing private data members in the header would be nice too IMO.</div></div>
</blockquote></div><br><div apple-content-edited=3D"true">
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; color:=
 rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-varia=
nt: normal; font-weight: normal; letter-spacing: normal; line-height: norma=
l; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; wh=
ite-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-=
spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decoration=
s-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-widt=
h: 0px; font-size: medium; ">-- Marshall<br><br>Marshall Clow &nbsp; &nbsp;=
 Idio Software &nbsp; &lt;<a href=3D"mailto:mclow.lists@gmail.com">mailto:m=
clow.lists@gmail.com</a>&gt;<br><br>A.D. 1517: Martin Luther nails his 95 T=
heses to the church door and is promptly moderated down to (-1, Flamebait).=
<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-- Yu Suzuki</span>

</div>
<br></body></html>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_6EAAC587-C2CC-46E4-8DBF-28E71BCBA705--

.
