Re: [PATCH] c++: error with constexpr operator() [PR107939]

2023-03-06 Thread Jason Merrill via Gcc-patches
On 3/3/23 12:51, Marek Polacek wrote: Similarly to PR107938, this also started with r11-557, whereby cp_finish_decl can call check_initializer even in a template for a constexpr initializer. Here we are rejecting extern const Q q; template constexpr auto p = q(0); even though q has a

[PATCH] c++: error with constexpr operator() [PR107939]

2023-03-03 Thread Marek Polacek via Gcc-patches
Similarly to PR107938, this also started with r11-557, whereby cp_finish_decl can call check_initializer even in a template for a constexpr initializer. Here we are rejecting extern const Q q; template constexpr auto p = q(0); even though q has a constexpr operator(). It's deemed non-con