C++ Logo

std-proposals

Advanced search

Re: [std-proposals] for ( repeat_count )

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 23 Oct 2023 14:10:33 -0700
On Monday, 23 October 2023 07:19:57 PDT you wrote:
> We have it already, operator `-->`:
> ```
> while(len --> 0) *p++ = Get();
> ```

The "Goes Down To" operator!

I thought about it but discarded because I thought it would cause an off-by-one
error. But no, it works!

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-10-23 21:10:35