220 5217 <73cad38f-c1b6-4ce3-bfc1-e4a660dbb638@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Teachability problems with std::move
Date: Tue, 25 Jun 2013 11:01:28 -0700 (PDT)
Lines: 58
Approved: news@gmane.org
Message-ID: <73cad38f-c1b6-4ce3-bfc1-e4a660dbb638@isocpp.org>
References: <CA+cyFgsYFbjG1M98PJS-XVzuJYbQmt7=4GOqS5_V5-WVJ0caLg@mail.gmail.com>
 <aa993593-2e71-4c1e-a510-d678672e5c17@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_698_11141268.1372183288823"
X-Trace: ger.gmane.org 1372183294 17253 80.91.229.3 (25 Jun 2013 18:01:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 25 Jun 2013 18:01:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDC55PNFRYGRB6NVU6HAKGQEMZWGYMY@isocpp.org Tue Jun 25 20:01:35 2013
Return-path: <std-proposals+bncBDC55PNFRYGRB6NVU6HAKGQEMZWGYMY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qa0-f70.google.com ([209.85.216.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDC55PNFRYGRB6NVU6HAKGQEMZWGYMY@isocpp.org>)
	id 1UrXYY-0005b0-Mk
	for gclcip-std-proposals@m.gmane.org; Tue, 25 Jun 2013 20:01:30 +0200
Original-Received: by mail-qa0-f70.google.com with SMTP id cr7sf1573046qab.9
        for <gclcip-std-proposals@m.gmane.org>; Tue, 25 Jun 2013 11:01:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-beenthere: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=vtAhJbI17MoC29ChMRyNn8kZHK3w8rkx5O2oW8Jbo7Q=;
        b=0cGa+kgbTwm6x9NfSz34ZAwYmKIJSu6QKin1idK5NUPWghdNW5KyZghdqpMiWtHOSK
         SAI2p8uSHiOD37Hnu3OddZzZVWclMBeJP2TkbGAopENEnKPFHUlAusXXO/zF6NA7Ho/q
         MgKdjqxqi6thcwyF575lPJWLpVnEbriwn7rK99Xx/NsClTxUfdfinJ9BseqeeyiWEi7K
         dVfSw5eF6c1hiGxA+nY/45bgrDzCHGBLon8hi8v6Mx+UBK/RFpUHwrzVg9U47IzKDWy9
         GR5BcgTykLePug3aAcBlDJnNh4/y+GnnlBnYN0DrlNynHWkMZYcDfC9wqK1u+lBdLHFZ
         j1uw==
X-Received: by 10.236.185.4 with SMTP id t4mr93867yhm.21.1372183289817;
        Tue, 25 Jun 2013 11:01:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.60.200 with SMTP id j8ls90609qer.42.gmail; Tue, 25 Jun 2013
 11:01:29 -0700 (PDT)
X-Received: by 10.49.39.9 with SMTP id l9mr8916qek.3.1372183289184;
        Tue, 25 Jun 2013 11:01:29 -0700 (PDT)
In-Reply-To: <aa993593-2e71-4c1e-a510-d678672e5c17@isocpp.org>
X-Original-Sender: mikhailsemenov1957@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:5217
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5217>

------=_Part_698_11141268.1372183288823
Content-Type: text/plain; charset=ISO-8859-1

You don't actually need the static_cast here. The following will do:

*std::unique_ptr<const Foo> FooFactory() {*

> *  std::unique_ptr<const Foo> result(new Foo);*
> *  // ...*
> *  return result;*
> *}*
>  
>
>  

-- 

--- 
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/.



------=_Part_698_11141268.1372183288823
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>You don't actually need the static_cast here. The following will do:</=
div><div><br><strong>std::unique_ptr&lt;const Foo&gt; FooFactory() {</stron=
g></div><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8e=
x; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-wi=
dth: 1px; border-left-style: solid;"><div><div><strong>&nbsp; std::unique_p=
tr&lt;const Foo&gt; result(new Foo);</strong></div><div><strong>&nbsp; // .=
...</strong></div><div><strong>&nbsp; return result;</strong></div><div><str=
ong>}</strong></div></div><div>&nbsp;</div><div><br>
</div>
</blockquote>

<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 />
&nbsp;<br />
&nbsp;<br />

------=_Part_698_11141268.1372183288823--

.
