[clang] Constexpr function of a function parameter cannot be used in a constant expression #118063
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
constexpr
Anything related to constant evaluation
duplicate
Resolved as duplicate
The following code compiles on gcc, but fails on msvc and clang:
https://godbolt.org/z/q1xajW1Gq
However, if
size
is made static, msvc also compiles:https://godbolt.org/z/Tfqe5E9z8
The problem seems to be with
arr
being passed by reference, as passing by value also get accepted.The text was updated successfully, but these errors were encountered: