This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
operator ?: in templates
- To: egcs-bugs at cygnus dot com
- Subject: operator ?: in templates
- From: Chris Heath <cheath at math dot lsa dot umich dot edu>
- Date: Fri, 19 Feb 1999 15:41:54 -0500 (EST)
- Reply-To: Chris Heath <cheath at math dot lsa dot umich dot edu>
Hi,
I am a little surprised to find that egcs doesn't like the ternary
?: operator inside a template parameter. Does the standard really exclude
such expressions?
I'm using version:
gcc version egcs-2.93.08 19990214 (gcc2 ss-980929 experimental)
Example code:
template<int i> class A {};
A<1?1:-1> a;
Errors:
test.C:2: `a' was not declared in this scope
test.C:2: parse error before `;'