[Bug c++/104160] Wrongly allowed: Function argumentin constant expression
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 21 21:05:16 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104160
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
struct Array {
static constexpr bool isArray() noexcept { return true; }
};
template <typename JSONVariant>
constexpr void buggyImpl(const JSONVariant& JSONValue) noexcept {
constexpr bool t = JSONValue.isArray();
}
int main() {
buggyImpl(Array{});
return 0;
}
There might be a dup of this too.
More information about the Gcc-bugs
mailing list