220 20724 <2149077.NQFMSFmPxb@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: Re: Null -conditional and -coalescing operators
Date: Wed, 23 Sep 2015 07:41:54 -0700
Lines: 31
Approved: news@gmane.org
Message-ID: <2149077.NQFMSFmPxb@tjmaciei-mobl4>
References: <4c3e2ee7-2159-4e93-a439-7d5c94c38c9c@isocpp.org> <2242837.lDbo80ytWE@tjmaciei-mobl4> <mtud36$9s3$1@ger.gmane.org>
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 1443019341 21206 80.91.229.3 (23 Sep 2015 14:42:21 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 23 Sep 2015 14:42:21 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBOXURKYAKGQEP6PEGHA@isocpp.org Wed Sep 23 16:42:08 2015
Return-path: <std-proposals+bncBCB4TK757YBRBOXURKYAKGQEP6PEGHA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBOXURKYAKGQEP6PEGHA@isocpp.org>)
	id 1ZelFG-0005kE-5t
	for gclcip-std-proposals@m.gmane.org; Wed, 23 Sep 2015 16:42:06 +0200
Original-Received: by wicgb1 with SMTP id gb1sf25593979wic.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 23 Sep 2015 07:42:05 -0700 (PDT)
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:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=+IMVvDfuzWuVobvmBn0h9VCRVy0RzFD7rwg5/bF3cHw=;
        b=mc/kwEpW6g3vQxQCr3mapWwYykzVS32BGZM/Bt/zQUOUqqvR/uk4CoWXh/hIxcg4es
         4D/p3dTT78g6zkdDXUUMTX7ZLgcAP1J/9mmLM9GRsyQ6wT6kTnEJHZ3XF5EVsdiNcda9
         yJCtnP/VexiheSHZIRceizC+TnNLpP6pfW5udOfQWnYMDINzOn4HNzg1XlajNlrEJGha
         a3vl1hUq2b/aoCniSlxZ39T2XigKwtgleK/VKBR+zjy1qhyoThkUAo37DIPdStoL0ARj
         TZFsgdwn6UHuxdHZSSUIHZH4HR8CACIfBipUt/72PwiCIt03HX+Tk5PLAQX5tteQtokM
         3XOA= 
X-Gm-Message-State: ALoCoQlNf7NbOLy4IqdYEAfOQtsX+hTAzLrw3LvSo01odJp/+23zeyHEMBONU3G+8SFbGt2TJROP
X-Received: by 10.180.12.170 with SMTP id z10mr673682wib.1.1443019325559;
        Wed, 23 Sep 2015 07:42:05 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.87.106 with SMTP id w10ls1114292wiz.53.canary; Wed, 23 Sep
 2015 07:42:02 -0700 (PDT)
X-Received: by 10.194.116.9 with SMTP id js9mr42303465wjb.51.1443019322174;
        Wed, 23 Sep 2015 07:42:02 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id bm2si10028602wjc.190.2015.09.23.07.42.01
        for <std-proposals@isocpp.org>;
        Wed, 23 Sep 2015 07:42:02 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl4.localnet (unknown [IPv6:2601:1c0:5803:81c9:30ee:b4bb:abb2:c60a])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 8B46F11B53F
	for <std-proposals@isocpp.org>; Wed, 23 Sep 2015 07:42:01 -0700 (PDT)
User-Agent: KMail/4.14.9 (Linux/4.1.6-1-desktop; KDE/4.14.9; x86_64; ; )
In-Reply-To: <mtud36$9s3$1@ger.gmane.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=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-Spam-Checked-In-Group: 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:20724
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/20724>

On Wednesday 23 September 2015 10:31:02 Matthew Woehlke wrote:
> > C code that returns error conditions, this is useful:
> > 	ErrorCode err = some_function();
> > 	err = err ?: some_other_function();
> > 	err = err ?: some_third_function();
> 
>   err || err = some_other_function();
> 
> :-)
> 
> (I've actually written code like that. Pedantically, I think it was of
> the form 'success && ...', but same idea...)

Hmm... good idea. Ugly, but why not?

Thanks for the suggestion.

-- 
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/.

.
