* Philip Ashmore:

/*HERE*/enum { value = (wanted <= guess) ? result : next_value_type::value };

Not a bug.  You need to implement your own conditional operator at the
template level to make this work.  The version with ?: is not valid
C++
Not valid C++ ? My C++ compiler (g++) disagrees.

Think of

   enum { big_int = (sizeof(int) > 4) ? true : false };

Have you tried compiling the example?

I don't remember reading anything about "conditional operator at the template 
level" in
Stroustrup's "C++ programming language (third edition).
Could you elaborate?

Philip

Reply via email to