C++ Logo

std-proposals

Advanced search

Re: "constexpr for" proposal

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Sat, 31 Oct 2020 22:54:30 +0200
On Sat, 31 Oct 2020 at 21:19, Gil Shallom via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
>
> Thank you, Peter, for the std::apply solution (https://en.cppreference.com/w/cpp/utility/apply#Example). It's very cool.
> I agree with Marcin and Arthur that a "constexpr for" allows for an easier to read and more expressible code.
> Anyone aware of a reason why p1306 did not include free form compile time for loops?
> (It could get the compiler stuck - but so can any other template meta programming bug).

What do you mean by "free-form"? You can already have any for-loop you
like in a constexpr function,
those are "free-form".

Received on 2020-10-31 15:54:43