220 16065 <1696280.25OUg0jlQd@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: const T* operator->() const
Date: Fri, 06 Feb 2015 08:42:52 -0800
Lines: 32
Approved: news@gmane.org
Message-ID: <1696280.25OUg0jlQd@tjmaciei-mobl4>
References: <56a7727d-9839-45c9-be72-a6ecb61f38c9@isocpp.org> <1932997.CYfMEhPeyI@tjmaciei-mobl4> <CAGMoNKtjXtq57fxF2sxrsPXLx7Po-xfXLQQRMAhE8EeU-2+CvQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1423240987 26318 80.91.229.3 (6 Feb 2015 16:43:07 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 6 Feb 2015 16:43:07 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBFO62OTAKGQEE36WZVA@isocpp.org Fri Feb 06 17:43:05 2015
Return-path: <std-proposals+bncBCB4TK757YBRBFO62OTAKGQEE36WZVA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f69.google.com ([74.125.82.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBFO62OTAKGQEE36WZVA@isocpp.org>)
	id 1YJlzj-0001OR-9W
	for gclcip-std-proposals@m.gmane.org; Fri, 06 Feb 2015 17:43:03 +0100
Original-Received: by mail-wg0-f69.google.com with SMTP id x12sf11473040wgg.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 06 Feb 2015 08:43:02 -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:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=iZv1fD5PplEgUuoNXw0bFzKOaSMLh8fL2V9JwvFmopY=;
        b=bJdwxUJl3eZxjaAw9pcrQgYA0vTyfC7x3YCJYFGtVpNrHhPCnKH/tfZE4ejHKxkqL1
         9icMo1nHz8BPGJykf4++eHwIcq3g+PSfn3nu4w8y/COEjREmCD4Ky/JMJ+rKKXSQEXLa
         +9hy9PJoIdACA1rLPp2i1p8XM/QNPoKGNYi9QmZ3ILO5PjXm1UVJYCwnX4D43McBAtD7
         mm6bV0IMQ3Y5g1G4IlZ8QT2IEikvN/xHUeOOOZfZ8ktIdWZrz6JjEMMvHlsaObcFMbGa
         CzF+0BH1mJUbgsyjEyo/DCPlc0d3Mr3b7ONCfSCtipStBrpaGPs3kOwG6sFnEdNClb6e
         dvFw==
X-Gm-Message-State: ALoCoQlZcUVEjHdTG3zbvs5IE1nn2NSNq/eZjMYDtWYBZkdN+8yRx7NMqZA24GXKUxzo7y8MRclr
X-Received: by 10.152.219.136 with SMTP id po8mr592980lac.4.1423240982699;
        Fri, 06 Feb 2015 08:43:02 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.211.230 with SMTP id nf6ls166947wic.20.gmail; Fri, 06 Feb
 2015 08:43:01 -0800 (PST)
X-Received: by 10.194.205.138 with SMTP id lg10mr8976452wjc.130.1423240981338;
        Fri, 06 Feb 2015 08:43:01 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id g6si5006321wjx.143.2015.02.06.08.43.00
        for <std-proposals@isocpp.org>;
        Fri, 06 Feb 2015 08:43:00 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl4.localnet (unknown [IPv6:2601:7:1c80:5d2:5e51:4fff:fe7c:49f8])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 7954B11A71A
	for <std-proposals@isocpp.org>; Fri,  6 Feb 2015 08:42:59 -0800 (PST)
User-Agent: KMail/4.14.4 (Linux/3.11.10-25-desktop; KDE/4.14.4; x86_64; ; )
In-Reply-To: <CAGMoNKtjXtq57fxF2sxrsPXLx7Po-xfXLQQRMAhE8EeU-2+CvQ@mail.gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=thiago@macieira.org
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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:16065
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/16065>

On Friday 06 February 2015 10:50:43 mobi phil wrote:
> > For example, the expression
> >
> >         type->member
> >
> > Is an lvalue and could be assigned to. But that doesn't mean that it is
> > assigned to, so the operator-> would have no choice but to copy and assume
> > that you do.
> 
> well, if you are directly accessing members, you would compromise the
> implementation of COW, wouldn't you?

How is accessing a member different from calling a member function? Either the 
inner object knows it's under COW or it does.

If it does, then the operator-> is irrelevant. The member functions implement 
the COW.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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/.

.
