https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117293
--- Comment #6 from m.cencora at gmail dot com --- Another argument for not showing the deprecation is that if I change: string a; to const string a; I don't get any deprecation warnings, but only for gcc-11+. This means that internal implementation of overload resolution has changed in gcc-11 in a way that if it finds a perfect candidate, then it doesn't even try to substitute the template params in other overloads, because these template overloads always loose against non-template. So a situation where printing a deprecation warning depends on implementation strategy of overload resolution seems bonkers to me.