C++ Logo

sg10

Advanced search

Re: [SG10] [isocpp-core] P1907R1 should have updated a feature test macro

From: David Vandevoorde <daveed_at_[hidden]>
Date: Wed, 13 Nov 2019 21:35:32 -0500
> On Nov 13, 2019, at 7:49 PM, Richard Smith via Core <core_at_[hidden]> wrote:
>
> On Wed, Nov 13, 2019 at 4:15 PM Barry Revzin via Core <core_at_[hidden] <mailto:core_at_[hidden]>> wrote:
> On Wed, Nov 13, 2019, 6:08 PM David Vandevoorde via Core <core_at_[hidden] <mailto:core_at_[hidden]>> wrote:
> > On Nov 13, 2019, at 6:56 PM, Richard Smith via Core <core_at_[hidden] <mailto:core_at_[hidden]>> wrote:
> >
> > Hi core and SG10!
> >
> > (Noticed by Jens when reviewing the merge of CWG motion 8.)
> >
> > P1907R1 made significant changes to the behavior of non-type template parameters. It should have affected some feature-test macro, but didn't. Should we bump the version of __cpp_nontype_template_args or __cpp_nontype_template_parameter_class?
>
>
> A bump in __cpp_nontype_template_parameter_class seems appropriate to me.
>
> Daveed
>
> I agree. This is the one introduced by P0732. I'd emailed Jens on Friday to say the same but he missed the email.
>
> Maybe we should bump both macros? P1907 also allows more kinds of NTTP argument (eg, pointers/references to subobjects) and more kinds of parameter (eg, floating-point parameters), not just classes.
>
> That said... I'm actually more inclined to say we should remove __cpp_nontype_template_parameter_class entirely and just bump __cpp_nontype_template_args. No-one ever fully implemented __cpp_nontype_template_parameter_class as far as I'm aware, and the feature we ended up with isn't class-type-specific (what we have now is "anything fully constant other than non-public subobjects or rvalue references”).

I’d be fine with that as well.

 Daveed


Received on 2019-11-14 03:35:36