C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Second draft of a __COUNTER__ proposal

From: Magnus Fromreide <magfr_at_[hidden]>
Date: Wed, 28 Aug 2024 08:21:52 +0200
On Tue, Aug 27, 2024 at 07:39:48AM -0700, Thiago Macieira via Std-Proposals wrote:
> On Tuesday 27 August 2024 07:15:27 GMT-7 Jeremy Rifkin via Std-Proposals
> wrote:
> > Thanks for elaborating, I see what you mean. I don’t know why __COUNTER__
> > has become existing practice over an approach like this, other that
> > __COUNTER__ working before C++14 and perhaps being more straightforward in
> > some regards. A consteval counter is an interesting idea but I also don’t
> > know how difficult that would be to add.
>
> I also don't see the point of such a consteval counter. Some of its uses are
> taken by the lambda trick and it does not cover all the cases that a
> preprocessor token would.

When I see this it reminds me of Herb Sutters P0707 but on a much more limited
scale.

/MF

Received on 2024-08-28 06:21:59