C++ Logo

sg10

Advanced search

Re: [SG10] Feature macro for P2128 - Multidimensional subscript operator

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Fri, 26 Mar 2021 18:36:47 +0100
On 26/03/2021 14.05, Corentin via SG10 wrote:
> Hello,
>
> I was tasked yesterday's EWG meeting to reach you about a feature macro for P2128,
> which does not currently provide one.
>
> I suppose there are 2 questions:
> Do we need one?
>
> I can't really imagine people doing
>
> #ifdef __cpp_multidimensional_subscript
> foo[x, y]
> #else
> foo(x,y)
> #endif
>
> Or something of the sort.

I think we should have one.

> If we do need one, would __cpp_multidimensional_subscript be a satisfactory name?

__cpp_multi_subscript

seems shorter.

Jens

Received on 2021-03-26 12:36:51