https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124324
Bug ID: 124324
Summary: [reflection] is_function reject static template
operator
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
```
#include <meta>
consteval std::meta::info worst_sizeof_p1(std::meta::info ty) {
static constexpr auto lam = []<class T>() static { return sizeof(T); };
return substitute(^^decltype(lam)::template operator(), {ty});
}
constexpr std::meta::info ws = worst_sizeof_p1(^^int);
static_assert([: ws :]() == 4); // ok
static_assert(is_function(ws)); // ok
static_assert(is_static_member(ws)); // ok
using F = size_t();
constexpr F* f = extract<F*>(ws);
```
Here we think that ws is a function template rather than a function, so the
extract fails.