220 13357 <41532757.1abU70X0Ru@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: proposal: deprecate failure to return
 (without annotation)
Date: Mon, 29 Sep 2014 21:29:34 -0700
Lines: 50
Approved: news@gmane.org
Message-ID: <41532757.1abU70X0Ru@tjmaciei-mobl4>
References: <m0cb44$d2e$1@ger.gmane.org> <7890243.H6e3ul2NkU@tjmaciei-mobl4> <b683c410-90f8-449e-b966-ecdbc823ece4@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1412051392 26278 80.91.229.3 (30 Sep 2014 04:29:52 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 30 Sep 2014 04:29:52 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBOHDVCQQKGQEHULAWQA@isocpp.org Tue Sep 30 06:29:47 2014
Return-path: <std-proposals+bncBCB4TK757YBRBOHDVCQQKGQEHULAWQA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f199.google.com ([209.85.212.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBOHDVCQQKGQEHULAWQA@isocpp.org>)
	id 1XYp4M-00007C-Js
	for gclcip-std-proposals@m.gmane.org; Tue, 30 Sep 2014 06:29:46 +0200
Original-Received: by mail-wi0-f199.google.com with SMTP id d1sf786219wiv.10
        for <gclcip-std-proposals@m.gmane.org>; Mon, 29 Sep 2014 21:29:46 -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:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=tDX2wvbxlJSSfbu49MdFp6GOleuUfB9+gZ+w66ZKzZg=;
        b=CFrDgwE7oaw0gNgzqyQhqxs321+K5+GDQT6Q7UTmf+dKJ8f8Te2B+nyJyN/TTjpR9q
         T7ZhE23tXfSrU9vKqESwkfSYf5NO6aU57vJwuH5vfGS3vuYVzGjMudwUCT+z8+p7l9HW
         8TXyR9zqfbALhnxRBj5DtXy76NdmAXiHRanJkFxmkdDBAg6fQ/0kYmQduCufHJObDDY3
         d3tvu3mP4lm4ss5pb2M+PnCDmt1sjUL3NWwTxctuZ2SavVVKi2PgZIFnYH0lkCoHyOOp
         UT7xfYAeAxn6bJwn9Y1OP9gfxHKQQlnFlUShWOQwUqJjmBpr8uGUTkqsx2HtGEqdzXe7
         hfhQ==
X-Gm-Message-State: ALoCoQnbXmzQ0yetvTmlTMhpEj+YKZynIqchkotwTXJbkNebs0EgtrXvvDl95WPCVxR9u7Jbssg/
X-Received: by 10.112.76.229 with SMTP id n5mr1285685lbw.8.1412051386262;
        Mon, 29 Sep 2014 21:29:46 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.18.131 with SMTP id w3ls398595lad.79.gmail; Mon, 29 Sep
 2014 21:29:43 -0700 (PDT)
X-Received: by 10.152.23.99 with SMTP id l3mr44171486laf.39.1412051383926;
        Mon, 29 Sep 2014 21:29:43 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id qn1si7702737lbb.23.2014.09.29.21.29.43
        for <std-proposals@isocpp.org>;
        Mon, 29 Sep 2014 21:29:43 -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:7:1c80:58c:789f:7f79:9a8f:12c4])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 6A5DD11B7FD
	for <std-proposals@isocpp.org>; Mon, 29 Sep 2014 21:29:41 -0700 (PDT)
User-Agent: KMail/4.14 (Linux/3.11.10-21-desktop; KDE/4.14.0; x86_64; ; )
In-Reply-To: <b683c410-90f8-449e-b966-ecdbc823ece4@isocpp.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.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:13357
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13357>

On Monday 29 September 2014 16:28:04 gmisocpp@gmail.com wrote:
> // Richards example with my additions:
> 
> void app_exit()
> {
>     exit(EXIT_FAILURE);
> }
> 
> enum E { a, b, c };
> int f(E e) {
>   // switch cases must cover all enum values or trigger error/warning.
>   switch (e) [[switch_on_all_enum_values]] (E) {
>   case a: return 1;
>   case b: return 2;
>   case c: return 3;
>   }
>   noreturn { // Whatever happens in here, there must be no way out.
>       app_exit();
>   }
[...]
> }

No, but this would:

enum E { a, b, c };
int f(E e) {
  // switch cases must cover all enum values or trigger error/warning.
  switch (e) [[switch_on_all_enum_values]] (E) {
  case a: return 1;
  case b: return 2;
  case c: return 3;
  }
  noreturn { }
}


-- 
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/.

.
