|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-04-05 16:58:44
Angus Leeming <angus.leeming_at_[hidden]> writes:
> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net