Can we change some constexpr
functions to consteval
in C++20 and later?
#3604
Unanswered
frederick-vs-ja
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some
constexpr
functions in the standard library always return the same constant value. It seems that we can change some of them toconsteval
in C++20 and later modes.It seems that the only difference happens on taking address. However, most standard library function are made non-addressable by WG21-P0551R3 in C++20, so ill-formedness on taking address seems OK.
Beta Was this translation helpful? Give feedback.
All reactions