help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it valid to call 'operator T()' directly in an template function?


From: Lionel B
Subject: Re: Is it valid to call 'operator T()' directly in an template function?
Date: 19 Nov 2004 01:14:19 -0800
User-agent: G2/0.2

Feng Ye wrote:
> fik wrote:
> > On further thoughts, the code as is, shouldn't run because
> > value in Field is never instantiated.
>
> Field is not a template class, so it does not need to be
> instantiated.

Agreed. "Instantiate" was not the correct term.

> The code is only for showing a bug of gcc parser. It does
> not need to be logically correct.

No; only syntactically correct.

> I have also checked under gcc 3.3. It was ok. Has anybody
> tried it with gcc 4.0?

Could this be a name-lookup issue? According to
http://gcc.gnu.org/bugs.html#known, name-lookup has changed to be more
standards-compliant in gcc >= 3.4. I can't make out whether this is
relevant to your problem, and can't install 3.4.* on my machine here to
test...

Otherwise perhaps you could search/report in the gcc-help@gcc.gnu.org
mailing list. You can access this list via http at
http://news.gmane.org/gmane.comp.gcc.help

Regards,

-- 
Lionel B



reply via email to

[Prev in Thread] Current Thread [Next in Thread]