Paolo Carlini wrote: >Hi Roberto, > >>Should I report this as a bug? >>If so, which kind of bug is it? >> >Isn't this c++/19989? > I should add that, on top of pt.c:tsubst (where the first error is issued unconditionally, irrespective of -pedantic) there is the following comment:
... Note that we must be relatively non-tolerant of extensions here, in order to preserve conformance; if we allow substitutions that should not be allowed, we may allow argument deductions that should not succeed, and therefore report ambiguous overload situations where there are none. In theory, we could allow the substitution, but indicate that it should have failed, and allow our caller to make sure that the right thing happens, but we don't try to do this yet. So... probably not trivially fixable... Paolo.