220 4404 <f6da2fc2-50cc-4000-a999-75928318fd10@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Even more extended friend declarations
Date: Tue, 14 May 2013 02:13:37 -0700 (PDT)
Lines: 52
Approved: news@gmane.org
Message-ID: <f6da2fc2-50cc-4000-a999-75928318fd10@isocpp.org>
References: <e4e49581-625b-4323-ad50-b25a1e89cc2b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_240_4585827.1368522817382"
X-Trace: ger.gmane.org 1368522821 9054 80.91.229.3 (14 May 2013 09:13:41 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 14 May 2013 09:13:41 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBQ4AZCGAKGQEM4I5IUQ@isocpp.org Tue May 14 11:13:41 2013
Return-path: <std-proposals+bncBCEKFTV6ZUMBBQ4AZCGAKGQEM4I5IUQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBQ4AZCGAKGQEM4I5IUQ@isocpp.org>)
	id 1UcBIj-0002Pe-2n
	for gclcip-std-proposals@m.gmane.org; Tue, 14 May 2013 11:13:41 +0200
Original-Received: by mail-ob0-f200.google.com with SMTP id ef5sf1083315obb.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 14 May 2013 02:13:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:date:from:to:message-id
         :in-reply-to:references:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=BOxtL0fPDwerJpvEwYYCZEeB7oiC6HhDaLZ54ePeFdI=;
        b=H9658cS7KN+oxbvjPjg0xyQ7Eli+c77FNWqJS98at/KhIgeirlBslhp4GPJLqFyDHX
         QNO9rN2M98Y7PHisnX2QhXxLN1vPB819Z+K/zyFwQaU77EuFeeC0scURh17jqaHZ0gFc
         4uwKGyP37ASSEXOACQchL17Fz4PMFXDKKfuwL5Ppa0vsMe/VXqE11F+P1CoAtPqETHzB
         tIkiWuFxNLUJzcETfQHvMTEyXH1gvIHbYs0ipabS5lIWc7XN+ma3jI4fjHFnUJYsFS7A
         IJ+njWymla1dOI5OuuJ7slc4afDJjfHgzx+UG8rDuc3awh556phXgAQYE4zFqlzVXM/S
         GVRw==
X-Received: by 10.42.65.4 with SMTP id j4mr22638209ici.17.1368522819835;
        Tue, 14 May 2013 02:13:39 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.112.71 with SMTP id io7ls259658igb.3.gmail; Tue, 14 May
 2013 02:13:38 -0700 (PDT)
X-Received: by 10.50.29.17 with SMTP id f17mr193536igh.7.1368522818558;
        Tue, 14 May 2013 02:13:38 -0700 (PDT)
In-Reply-To: <e4e49581-625b-4323-ad50-b25a1e89cc2b@isocpp.org>
X-Original-Sender: jmckesson@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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4404
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4404>

------=_Part_240_4585827.1368522817382
Content-Type: text/plain; charset=ISO-8859-1

Or you could just use dependency injection. That's pretty much the only way 
you can have transfer of private status between functions that are not 
directly known about at compile time.

`allocate_shared` *could* have done this, if it were properly defined in 
terms of `allocator_traits<A>::construct` instead of placement new. Your 
allocator object would be the dependency you inject, and the protection 
class is effectively on who's allowed to create your allocator objects.

-- 

--- 
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/?hl=en.



------=_Part_240_4585827.1368522817382
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Or you could just use dependency injection. That's pretty much the only way=
 you can have transfer of private status between functions that are not dir=
ectly known about at compile time.<br><br>`allocate_shared` <i>could</i> ha=
ve done this, if it were properly defined in terms of `allocator_traits&lt;=
A&gt;::construct` instead of placement new. Your allocator object would be =
the dependency you inject, and the protection class is effectively on who's=
 allowed to create your allocator objects.<br>

<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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_240_4585827.1368522817382--

.
