220 33767 <omgg26$pob$1@blaine.gmane.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Bo Persson <bop@gmb.dk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A more advanced switch
Date: Thu, 10 Aug 2017 04:23:10 +0200
Lines: 65
Approved: news@gmane.org
Message-ID: <omgg26$pob$1@blaine.gmane.org>
References: <f8c908e2-d06f-4cd1-bda0-fe2b97fd21f1@isocpp.org>
 <574320af-c1ae-4676-883c-ae4e91fcd874@isocpp.org>
 <CAOHCbisLgTxLz75Em3Had35AecQrtpRZKFWRaMXUZsSVtN7Fng@mail.gmail.com>
 <bffc4188-593d-426e-bf4c-01c6a2952087@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
X-Trace: blaine.gmane.org 1502331804 30550 195.159.176.226 (10 Aug 2017 02:23:24 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 10 Aug 2017 02:23:24 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCZ6RLW3UIKBBFUHV7GAKGQEVTZ3PKQ@isocpp.org Thu Aug 10 04:23:20 2017
Return-path: <std-proposals+bncBCZ6RLW3UIKBBFUHV7GAKGQEVTZ3PKQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f197.google.com ([209.85.128.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCZ6RLW3UIKBBFUHV7GAKGQEVTZ3PKQ@isocpp.org>)
	id 1dfd7y-0007R1-Cg
	for gclcip-std-proposals@m.gmane.org; Thu, 10 Aug 2017 04:23:14 +0200
Original-Received: by mail-wr0-f197.google.com with SMTP id u89sf11086097wrc.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 09 Aug 2017 19:23:21 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1502331801; cv=pass;
        d=google.com; s=arc-20160816;
        b=cgM1rO/MSO6O7exPfmYHSltlnfQGheMkklpDtfUVeT+Yn4pgpXLOgjbD22CfgdiR8T
         9STadxg/9v9rrdlvYhrny4N9w1NbutjTh0yBOg6yQz9OUuvsl7+qiQv2EWK/UBi4dsCy
         +odl2kJKvBuZpDbbnrGmJxy300exfhLaLefprMTfB98oQpQruV2FVEsrDx78nlpPq7tg
         sSQ+XqH2g4VNzy92f5ntL9/9riBzjRmCPqzj5uKPEjghmm4Bhgz3srjnAG6IdzV+W1/1
         1ubLVV8fv4Xeb344cetudfM3J4k8O/NxrFuZLZe279nEf6y+yuCxa0giJyteew6wGebp
         QDFA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:user-agent:mime-version:references:message-id:lines
         :date:subject:from:to:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=tIWd3L9JMNc+jrGtvbP4UlCS05YRz4/aE3NxVhtvJLk=;
        b=0YSx4EcorcTP8vUfj1w6H93+9ez8Di4LhiG6t0598+pkVElDVcQUuITuyNSzA4oxLQ
         l8aUXvz/tZEdy9lOns98syBHCKSFYVQK3l2CRE7TnMDHkUwY5EvhECXEKYdCXdrNPDQe
         ZOcIxbVvXAlhVhs32Ze5y5HLLrQnzrarfIzPEonWTwV5hqL1JJ/iIdJ1RKliuF78UiOC
         8JUap1f7BCscNeeZYVbkN1OExW8ClIrFZca+VXvQpiooSF6E1gq/FWawxZ4BgSwDnGKG
         lfPMfyyTfC2rhNgh8HgIvMKFoP5gkcqTzow44Hv44ZwHej3tMHbdwokMGvvvzxXG14hd
         jidQ 
ARC-Authentication-Results: i=2; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :user-agent:in-reply-to:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=tIWd3L9JMNc+jrGtvbP4UlCS05YRz4/aE3NxVhtvJLk=;
        b=d5T+t9o7qHIO5xxjL34nngFuiRT9XpwxpeEUwe5S7Kdo9BX9EAdrX0oLwwKHPWVjrC
         yflp/FTacB2LkdOtJg1jhaDFOvbQcQwhvqBjt58y4Pjhx8Kxbx89oQBPKSOZKmp9CNIF
         78jLQdmaQoT6nDUqaTZHCG9IlYemN/YXEtsS5DMADZ+RqrpYDOBGkESrDu2Vjpv9IyMJ
         28+a5CGAScPXKAhfL4XN/+ojp8n1WIfji0gpqMOYzsEOWMXogRfx3Y3XBPFjA8PxmvRP
         xR9eSIqesQG4oJb6s1TfHXDuiOtZdCPRctMfOqRQk6B8wtCBkgAyVUspEke6jRqDPO41
         IqkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent:in-reply-to:content-language
         :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=tIWd3L9JMNc+jrGtvbP4UlCS05YRz4/aE3NxVhtvJLk=;
        b=V+v2SAMrg7jIfn5xbO7CuViWOfjt8XUM4JVwehknJvxw7SzXMNOOY8izJk3CluKHHX
         Z/EkWChXiHTU4d2R+hjxQ2kplqmDs5M5MN0A2whjqL2nobNrwUBZOVUBAaV4Ea3wC5q2
         AwUIFCpfQJaMGm7XjLb3/a3Ow6DL6+mpwDhPNquz28dA2ARJg0+CX0pWyOoH+Sw3Kk70
         SfVnth2CUab56E7yb4xDB24/kiSfa5fs/ZTkWAH3hh8GWMxbw72G0etTqe/zXdpnRJn+
         N7fiwDMM1un+25JncSwUZAOGVju3sKX0GaMfz8T4ZjU9nxm1Xe6B+ho9Oh7K/HWUrbmm
     
X-Gm-Message-State: AHYfb5i5RfOQUYL6S7OjLW0gQcR42oai/hmZX/GzQIwWXXBHZr5vB8ko
	M0BJEW9ki9gdKA==
X-Received: by 10.28.11.144 with SMTP id 138mr1145994wml.23.1502331800956;
        Wed, 09 Aug 2017 19:23:20 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.166.200 with SMTP id p191ls435293lfe.5.gmail; Wed, 09 Aug
 2017 19:23:18 -0700 (PDT)
X-Received: by 10.25.59.76 with SMTP id i73mr4056463lfa.0.1502331798514;
        Wed, 09 Aug 2017 19:23:18 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1502331798; cv=none;
        d=google.com; s=arc-20160816;
        b=q5+/3kD6YcZ2axyPOPThC+Zb9pnj9KKoMA8LdHHg+eT7KCOE3hv/2afLggsieC5j9Q
         Ow511tY8LyEatePMMNjGqtiMaE28SfHZfSyZFjAXUARyhEg0lqJh0kvFrgfoNV8M2LNU
         zCsNH3nTMMgIb3tZlGWVs7Uo7wFwstqby73iBnURd/7aenZnxRft37L3jouSn6wnfCZ1
         u7K2YpUOFggDRvbzTd+/HTaLYYVsUUokaX4EAiiXWTABYJctb1B9Ptwy5iL1y8p+xJbs
         NW8STWYpF508NfLaNN4ZAPXU/7skuiXDiSGInZQhV+wy+8sms9N80L0AXKQ+/6FFmFRx
         azQA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:in-reply-to:user-agent:content-transfer-encoding
         :mime-version:references:message-id:lines:date:subject:from:to
         :arc-authentication-results;
        bh=ZqMT4Wy7toJtMsMzNRNPA7xpkCfcRwkVobL/Cgxh6kc=;
        b=egxKWPbIJqBxSO/SLeR3bPhrUhWsg7x1gAtPn3PWuciMFuCy8PAwkcSDaipmQkXRwl
         VtOfcI/fD+rUnu92hzWhaZmEIvNNMc9NV94heEseVyrhwimGDZtCZzcD6eKC/h1dAKX/
         7T8L71+4vfQNNlq5FxzOXREnqUXqZmR5Dn7hXybpafsLFBhS1cVZ0qgbZRkd4UqhBsJW
         jANp6aG5pxqqVQ6sokQ2EBnAeuJIT/4n0BGHmF6BcYmp6SZKQ1vaxGXdP2oXOmKK9HGF
         FFeNmrYeqQQtbsuJFHDtfgdQwKCyfXhFXCPtw7inKAVcUGmRiiwZnl4JsQ5r3yO5gonN
         47+g==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org
Original-Received: from blaine.gmane.org ([195.159.176.226])
        by mx.google.com with ESMTPS id a15si2438499lfe.272.2017.08.09.19.23.18
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 09 Aug 2017 19:23:18 -0700 (PDT)
Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) client-ip=195.159.176.226;
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1dfd7u-0007H2-Qs
	for std-proposals@isocpp.org; Thu, 10 Aug 2017 04:23:10 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 58
Original-X-Complaints-To: usenet@blaine.gmane.org
In-Reply-To: <bffc4188-593d-426e-bf4c-01c6a2952087@isocpp.org>
Content-Language: sv
X-Original-Sender: gclcip-std-proposals@m.gmane.org
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 195.159.176.226 is neither permitted nor denied by best guess
 record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.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: <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:33767
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33767>

On 2017-08-10 03:13, gmisocpp@gmail.com wrote:
> 
> 
> On Thursday, August 10, 2017 at 5:08:18 AM UTC+12, Tony V E wrote:
> 
>     break by default is fine, how do I opt-out within switch break, or
>     is it all or nothing?
> 
>     switch break(x)
>     {
>     case 1:
>     case 2:
>          foo();
>     case 3:
>          bar();
>     case 4:
>          etc();
>       }
> 
> 
>     How do I get fallthru on case 1 to 2?
> 
> 
> I would not object to fallthrough being a keyword like so (but see later):
> 
> switch break(x)
> {
> case 1: fallthrough;
> case 2:
>      foo();
> case 3:
>      bar();
> case 4:
>      etc();
>   }
> 

That would make it really experts-only, as we already have the current 
version

switch (x)
{
case 1: [[fallthrough]];
case 2:
      foo();
case 3:
      bar();
case 4:
      etc();
   }


How many variations do we need?


     Bo Persson



-- 
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/omgg26%24pob%241%40blaine.gmane.org.

.
