220 8134 <246f987c-1f3a-431a-bc72-e7683bd79ea6@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Akira Takahashi <faithandbrave@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: report typo : N3784 Improvements to std::future<T>
 and Related APIs
Date: Sun, 15 Dec 2013 21:58:08 -0800 (PST)
Lines: 119
Approved: news@gmane.org
Message-ID: <246f987c-1f3a-431a-bc72-e7683bd79ea6@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_1428_24644974.1387173488355"
X-Trace: ger.gmane.org 1387173484 23557 80.91.229.3 (16 Dec 2013 05:58:04 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 16 Dec 2013 05:58:04 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCH2FA56WUARB4VMXKKQKGQEYQFG7AI@isocpp.org Mon Dec 16 06:58:12 2013
Return-path: <std-proposals+bncBCH2FA56WUARB4VMXKKQKGQEYQFG7AI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f198.google.com ([209.85.223.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCH2FA56WUARB4VMXKKQKGQEYQFG7AI@isocpp.org>)
	id 1VsRBz-0005cq-Ly
	for gclcip-std-proposals@m.gmane.org; Mon, 16 Dec 2013 06:58:11 +0100
Original-Received: by mail-ie0-f198.google.com with SMTP id tp5sf16717207ieb.5
        for <gclcip-std-proposals@m.gmane.org>; Sun, 15 Dec 2013 21:58:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=MvOKG+L2aiphX/vihsIrJFUZ0RshV1/hJcn6UcBwqDY=;
        b=HtDT4ifj1VCADcffa3HassW+NE20pqiewf1kU4/XkMwMfIHS9CEysHj4y6BCv6Hjtr
         VBoly7NEWxv3oi65IjjtczQC6XfrQNEYUMqRTjOarhXBWeXyS8rRGQn/vJPePmLj/yfD
         YPHU2vBPg9kwF3qroTevN4I+tdhPeYaymXf9OgDgJ219x34SyON4bE53LBuHsuoIQvWc
         2w307ItmQXjiCJ6kRtTh1H8NEU0edFl6uGKFriVpBM/BpI4w7ezZ0i1J9a2akmDEpnnZ
         qsf5su65tzhMcg6cNmYlYMcoPmMBHwzJuQMUAEQ4PeeUDWiB9TZQJqG0orsqLqIICM41
         H6RQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=MvOKG+L2aiphX/vihsIrJFUZ0RshV1/hJcn6UcBwqDY=;
        b=I9C7LbypCvWs82gGaKP16SmDSj6hzqfs+Ce3hII0agkX6/V/ox896ryQFTXLqcHEVf
         +wfz0Im6yTuxezbnbMeopWG9dJDas+pBkq9a34+/ik/vo3ol36eLarmNPiLdW4mIyohA
         w+PKKCJauS5d1N2Pw0oANluOEDWlWO2bny4Qu//XSit5NB3gWYvVyC/oP6d5I/CykIz3
         hIy2nGpLLQZ4kQ+NjqDMQLXVydWiDjTc9H5z0YISMFKiDWzLEyhF88CF4b62bpRaoU+2
         uz/eGqIh0JRko9bof7gDaeZlKxrvn5hKGsJ2Va8df5K0IA1V1swG8IZujSTVrNouSGNM
         93rw==
X-Gm-Message-State: ALoCoQkZZTVZrHrL/ZEfnUrEUSQ1qOQkbU4kqfkzL/6juGTQkmHrsUieHr+h4NocqSCxuL3tyJdG
X-Received: by 10.50.41.101 with SMTP id e5mr5912118igl.0.1387173490787;
        Sun, 15 Dec 2013 21:58:10 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.51.15.197 with SMTP id fq5ls1480686igd.20.canary; Sun, 15 Dec
 2013 21:58:09 -0800 (PST)
X-Received: by 10.50.66.243 with SMTP id i19mr61168igt.17.1387173489873;
        Sun, 15 Dec 2013 21:58:09 -0800 (PST)
X-Original-Sender: faithandbrave@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:8134
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8134>

------=_Part_1428_24644974.1387173488355
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Hi,
I found few minor typo.

N3784 Improvements to std::future<T> and Related APIs
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3784.pdf

1. `then` example.
`int` hasn't `to_string` member function.

#include <future>
using namespace std;
int main() {
    future<int> f1 =3D async([]() { return 123; });
    future<string> f2 =3D f1.then([](future<int> f) {
        return f.get().to_string(); // here .get() won=92t block
    });
}

should be:

        return to_string(f.get()); // here .get() won=92t block


2. `unwrap` example.
`future` need template argument.

#include <future>
using namespace std;
int main() {
    future<future<int>> outer_future =3D async([]{
        future<int> inner_future =3D async([] {
            return 1;
        });
        return inner_future;
    });

    future<int> inner_future =3D outer_future.unwrap();

    inner_future.then([](future f) { // need template argument
        do_work(f);
    });
}

should be:

    inner_future.then([](future<int> f) {


Thanks,
Akira

=3D=3D
Akira Takahashi
site: sites.google.com/site/faithandbrave/about/en

--=20

---=20
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 e=
mail 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-proposa=
ls/.

------=_Part_1428_24644974.1387173488355
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div>I found few minor typo.</div><div><br></div><div>N=
3784 Improvements to std::future&lt;T&gt; and Related APIs<br></div><div>ht=
tp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3784.pdf<br></div><d=
iv><br></div><div>1. `then` example.</div><div>`int` hasn't `to_string` mem=
ber function.</div><div><br></div><div><div>#include &lt;future&gt;</div><d=
iv>using namespace std;</div><div>int main() {</div><div>&nbsp; &nbsp; futu=
re&lt;int&gt; f1 =3D async([]() { return 123; });</div><div>&nbsp; &nbsp; f=
uture&lt;string&gt; f2 =3D f1.then([](future&lt;int&gt; f) {</div><div>&nbs=
p; &nbsp; &nbsp; &nbsp; return f.get().to_string(); // here .get() won=92t =
block</div><div>&nbsp; &nbsp; });</div><div>}</div></div><div><br></div><di=
v>should be:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; return to=
_string(f.get()); // here .get() won=92t block<br></div><div><br></div><div=
><br></div><div>2. `unwrap` example.</div><div>`future` need template argum=
ent.</div><div><br></div><div><div>#include &lt;future&gt;</div><div>using =
namespace std;</div><div>int main() {</div><div>&nbsp; &nbsp; future&lt;fut=
ure&lt;int&gt;&gt; outer_future =3D async([]{</div><div>&nbsp; &nbsp; &nbsp=
; &nbsp; future&lt;int&gt; inner_future =3D async([] {</div><div>&nbsp; &nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp; return 1;</div><div>&nbsp; &nbsp; &nbsp; &n=
bsp; });</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return inner_future;</div><d=
iv>&nbsp; &nbsp; });</div><div><br></div><div>&nbsp; &nbsp; future&lt;int&g=
t; inner_future =3D outer_future.unwrap();</div><div><br></div><div>&nbsp; =
&nbsp; inner_future.then([](future f) { // need template argument</div><div=
>&nbsp; &nbsp; &nbsp; &nbsp; do_work(f);</div><div>&nbsp; &nbsp; });</div><=
div>}</div></div><div><br></div><div>should be:</div><div><br></div><div><d=
iv>&nbsp; &nbsp; inner_future.then([](future&lt;int&gt; f) {</div></div><di=
v><br></div><div><br></div><div>Thanks,</div><div>Akira</div><div><br></div=
><div>=3D=3D</div><div>Akira Takahashi</div><div>site:&nbsp;sites.google.co=
m/site/faithandbrave/about/en</div></div>

<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 />

------=_Part_1428_24644974.1387173488355--

.
