C++ Logo


Advanced search

Subject: consteval functions and constexpr parameters
From: Yongwei Wu (wuyongwei_at_[hidden])
Date: 2021-01-06 07:04:27

As outlined in this article
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?

Best regards,


Yongwei Wu
URL: http://wyw.dcweb.cn/

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

Older Archives on Google Groups