This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

operator ?: in templates


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 `;'




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]