C++ Logo


Advanced search

Subject: Re: consteval functions and constexpr parameters
From: Christof Meerwald (cmeerw_at_[hidden])
Date: 2021-01-06 07:19:44

see http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1045r1.html

On Wed, Jan 06, 2021 at 09:04:27PM +0800, Yongwei Wu via Std-Discussion wrote:
> As outlined in this article
> https://mpark.github.io/programming/2017/05/26/constexpr-function-parameters/,
> C++ does not have constexpr parameters—we cannot use the arguments in a
> constexpr function as constexpr variables. That rules out many valid
> usages, and we had to use ugly hacks. Now we have consteval in C++20, and
> consteval functions are supposed to be evaluated only at compile time, is
> there any obstacle to regarding their parameters as constexpr?
> Is there a real technical difficulty, or is it only that no one has
> proposed it?


http://cmeerw.org                              sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups