werasm <we****@gmail.comwrote in news:1188571730.473230.203540
@r34g2000hsd.googlegroups.com:
Victor Bazarov wrote:
>Too little sleep last night to be able to dig through the Standard,
but GCC's behaviour does look justified.
Yes, I have the same problem. Too little time to delve into
the standard (need to keep that balance...). I also know there
are guys here that know the standard by heart (almost) and
probably know the answer, hence the question. I also prefer
writing code that is compliant (else I run into trouble with code
that fails to compile somewhere down the line).
Explicitly qualifying Base will never be wrong, therefore it is
probably the way to go (if the other way cannot be proven right,
at least). Was just curious.
Regards and Thanks,
Werner
Well, *I* know that VC doesn't use correct two phase lookup and
therefore finds names it technically shouldn't. I have never had a case
where this caused actual problems though, but technically it's wrong.
If I had to guess, I would guess gcc is right as well. My reasoning
(and it may well be faulty) goes like this. What is needed to invoke
the base class constructor is a class name. Template classes can't
deduce their template argument types, therefore you need to provide it.
Same rule holds here, Base would have to somehow deduce its template
argument and that doesn't normally work.
As you can see though, I have no rules to quote and my quick attempt at
finding them proved that I am not proficient in standard-ness.
joe