Out of topic but the syntax could be used for the “break” and “continue” statements as well:

for (int i = 0; i < 10; ++ i)
  for (int j = 0; j < 10; ++ j)
    if (j == 5)
      break(1); // breaks out if both loops
    else
      continue(0); // resume inner loop

I had this idea for a long time...

-- 

Phil Bouchard
Founder
C.: (819) 328-4743

Fornux Logo

On Oct 5, 2019, at 1:43 AM, Phil Bouchard <phil@fornux.com> wrote:

It can't break the standards because you're adding a new syntax, you're not replacing one or hijacking the template token types.

For the rest maybe I can help but you seem to be more aware of the latest standards than I am.

Also IMO this is really important in order to keep the standards as clean and simple as possible.


On 10/5/19 1:37 AM, Brian Bi wrote:
I'd be willing to write a proposal but it would be a lot of work, so I'm curious whether people think this would be something good to have in addition to P0847, before I go ahead and write it up.

On Sat, Oct 5, 2019 at 12:19 AM Phil Bouchard via Std-Proposals <std-proposals@lists.isocpp.org> wrote:

Are we moving forward with the syntax Brian suggested? It seems good to me...


On 10/4/19 11:31 AM, Phil Bouchard wrote:

But Brian came up with a better syntax.


--

Phil Bouchard
Founder
C.: (819) 328-4743

Fornux Logo
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals


--
Brian Bi
--

Phil Bouchard
Founder
C.: (819) 328-4743

Fornux Logo