220 35837 <250bd144-e016-4c31-bba8-0e3e8a8cb6ce@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: odomobo@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Output parameters
Date: Sat, 9 Dec 2017 18:30:47 -0800 (PST)
Lines: 67
Approved: news@gmane.org
Message-ID: <250bd144-e016-4c31-bba8-0e3e8a8cb6ce@isocpp.org>
References: <1c1bb50b-2d59-4247-a158-158065fb1a9a@isocpp.org>
 <0c471d5c-b9b2-40f9-a2bf-908edbb1f272@isocpp.org> <17e3b13c-eb1b-fc2c-590e-3d394f164f9a@wanadoo.fr>
 <d750d914-94c4-4f17-b20d-bc8ca51f58ea@isocpp.org> <1c8e3ec4-6c5f-43db-bb6e-131d725f7ba4@isocpp.org>
 <CADbh+eTfRrCVvisr2=OGCBX5=PATnzv_0gMCFax-_LBf+wUhuQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2769_1669322011.1512873047256"
X-Trace: blaine.gmane.org 1512873047 9618 195.159.176.226 (10 Dec 2017 02:30:47 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 10 Dec 2017 02:30:47 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCIJNUOTWIOBBWFYWLIQKGQEW2IZA3A@isocpp.org Sun Dec 10 03:30:43 2017
Return-path: <std-proposals+bncBCIJNUOTWIOBBWFYWLIQKGQEW2IZA3A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f71.google.com ([209.85.213.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCIJNUOTWIOBBWFYWLIQKGQEW2IZA3A@isocpp.org>)
	id 1eNrO7-0002JO-2t
	for gclcip-std-proposals@m.gmane.org; Sun, 10 Dec 2017 03:30:43 +0100
Original-Received: by mail-vk0-f71.google.com with SMTP id d134sf7842454vke.9
        for <gclcip-std-proposals@m.gmane.org>; Sat, 09 Dec 2017 18:30:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=qewU4WJTs5tjOu21fnkHheHf0T3Faiv8QGQuD07KNzM=;
        b=CvHR9nGb+ATSq2hK+BvYk0SiuZsTlCIqPwxYdIggvc1Q2OzFgFxNG2d4P06cGdStgH
         Xeihnv2EzIiEWNQ0gZCzpqnl1GBHeiqEfhlOO2JBZUQFqlTwoTUFtwnZjz5J0dsF2DTV
         4W1GEHHFK6xpPRi4DCYr1lV5+6qEOkvZRO+RE49nrKcoxBn+JPB0mskPGM+wNSIDG2g8
         ++r75LsScIlKLGRr2WL6AUyuumWgqsKEqf2SXpAX5OBNREOMmDtlIgS9XsnGILYMKeKD
         vOQm9YoaqfuE2D7w/lT/lPLx8Tf3pLmoZC6eLRc1CN62SPsELzSdKuWb0sGgPYbPlQD7
         HSFw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=qewU4WJTs5tjOu21fnkHheHf0T3Faiv8QGQuD07KNzM=;
        b=Tjy9GqTzmVD7r+flEOKefOt/QQo5THAPt3nmjCM43qd98pkTDutXJEUYCKRpoDfGVD
         srdH1FE4oeh7IqzHBUF/E1CCcyzDrW2RD89a/ybC0WuhXGhCxElqxpT724Ve9aKWCtoP
         d4cO5D78sJjYUnqLlJfD0xS0h/Af6zrMXNbZiPhh6emqIdi6iSDo/sztfRx2c2Rpetde
         sJytzt1yCqesEAJynDwRaDx49Stp1eWRIlueEsL1zNZSYFBFQM9Tbde5wPNh8H7zN5Ca
         09SoB3IxNG+YNMhnT2U1lI5t4cqonenhraEXRm5Me4CscUQK+2ktvONeFF15B5GVlLtt
         9GWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=qewU4WJTs5tjOu21fnkHheHf0T3Faiv8QGQuD07KNzM=;
        b=tblalpAnVRV69hfpmlgSaUk83ZZWMBQtiIlOFG6/g4mtdloncE8VQHdoPPXJOYj5o5
         YW3Ko4qE9rR05LFnDGeNZDmHM+Wyn7cSFUb/kmgnfUQq4FwkkvTRDt7gqOD3BpyjbbGU
         GER0gL+fwNTJOVlx3nN/Umw7iquhU0Ofuqtyt7FOvUrPMrlCVgRnaF6LuQU5si/GwKXU
         5xzCxuR8xgUKqHoDoV6jCW7MnciRjFfKBbX1cO1Cz0mMi3cD7Sm+OhJGK7aaKwws8uXu
         sLIXD1y257Z71sOxRWIv8jIpKOIOgsLIfE/zavDY424iwhDON8NZfODU9k8/sLTGfqG9
         A3FA==
X-Gm-Message-State: AKGB3mIGlfgpGzuRnaBUPSSACnSp47JLqjo4JYxotVqQPQUFrxwB9IUg
	2NhahQSVbOYmcnKVgjKEDMbteA==
X-Google-Smtp-Source: ACJfBostswmeuo6lS151az1GZ3PMilRwYNcESy/uQFj3OFPy3e++53fSDegdJs8WRrDByXKtXCjilg==
X-Received: by 10.31.84.1 with SMTP id i1mr1943001vkb.86.1512873049338;
        Sat, 09 Dec 2017 18:30:49 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.159.45.129 with SMTP id v1ls1614889uaj.18.gmail; Sat, 09 Dec
 2017 18:30:47 -0800 (PST)
X-Received: by 10.31.94.198 with SMTP id s189mr1704646vkb.9.1512873047793;
        Sat, 09 Dec 2017 18:30:47 -0800 (PST)
In-Reply-To: <CADbh+eTfRrCVvisr2=OGCBX5=PATnzv_0gMCFax-_LBf+wUhuQ@mail.gmail.com>
X-Original-Sender: odomobo@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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:35837
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35837>

------=_Part_2769_1669322011.1512873047256
Content-Type: multipart/alternative; 
	boundary="----=_Part_2770_1965880271.1512873047256"

------=_Part_2770_1965880271.1512873047256
Content-Type: text/plain; charset="UTF-8"



On Saturday, December 9, 2017 at 7:11:11 PM UTC-6, Brittany Friedman wrote:
>
> I agree that #2 is the right solution. One change that might make #2 more 
> palatable would be to allow structs to be declared as part of a function's 
> return type. MSVC seems to accept this code but I don't think it is 
> conforming.
>
> struct { int mean; int median; int mode; } calc_averages(vector<int>);
>

I like that syntax, but according to [dcl.fct]/9 it shouldn't be allowed. I 
wonder why this is expressly disallowed -- it seems like an optimal 
solution to this kind of an issue, assuming a named struct wasn't 
appropriate.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/250bd144-e016-4c31-bba8-0e3e8a8cb6ce%40isocpp.org.

------=_Part_2770_1965880271.1512873047256
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Saturday, December 9, 2017 at 7:11:11 PM UTC-6,=
 Brittany Friedman wrote:<blockquote class=3D"gmail_quote" style=3D"margin:=
 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div =
dir=3D"ltr">I agree that #2 is the right solution. One change that might ma=
ke #2 more palatable would be to allow structs to be declared as part of a =
function&#39;s return type. MSVC seems to accept this code but I don&#39;t =
think it is conforming.<div><br></div><div>struct { int mean; int median; i=
nt mode; } calc_averages(vector&lt;int&gt;);</div></div></blockquote><div><=
br></div><div>I like that syntax, but according to [dcl.fct]/9 it shouldn&#=
39;t be allowed. I wonder why this is expressly disallowed -- it seems like=
 an optimal solution to this kind of an issue, assuming a named struct wasn=
&#39;t appropriate.</div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/250bd144-e016-4c31-bba8-0e3e8a8cb6ce%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/250bd144-e016-4c31-bba8-0e3e8a8cb6ce=
%40isocpp.org</a>.<br />

------=_Part_2770_1965880271.1512873047256--

------=_Part_2769_1669322011.1512873047256--

.
