Angus Leeming
David Abrahams wrote:
// Only the specializations (below) of this template will compile. template <int N> static foo set() { return invalid_value; }
Without a definition for invalid_value, this is invalid code, and on a conforming compiler, compilation fails at the point it is parsed.
Thanks again. g++ 3.3 appears to happy differentiate between "valid" and "invalid" enum values with the code below,
Well *that* code is valid, unlike the code of your previous post.
so allow me to rephrase my earlier question: which of the two techniques we've discussed would you use?
I have no opinion.
I assume that one has technical merits over the other?
I don't know; they're both pretty ugly ;-) -- Dave Abrahams Boost Consulting www.boost-consulting.com