|
From: | Feng Ye |
Subject: | Re: Is it valid to call 'operator T()' directly in an template function? |
Date: | Fri, 19 Nov 2004 09:32:36 +0800 |
User-agent: | Mozilla Thunderbird 0.9 (Windows/20041103) |
fik wrote:
On further thoughts, the code as is, shouldn't run because value in Field is never instantiated. I wonder whether putting in a constructor/destructor for Field will help? Perhaps the compiler realizes that value is never instantiated in the class and optimises it away along with the operators.
Field is not a template class, so it does not need to be instantiated.The code is only for showing a bug of gcc parser. It does not need to be logically correct.
I have also checked under gcc 3.3. It was ok. Has anybody tried it with gcc 4.0?
Regards, Feng Ye
[Prev in Thread] | Current Thread | [Next in Thread] |