|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-01-08 01:36:31
Terje Slettebø <tslettebo_at_[hidden]> writes:
>>From: "Paul Mensonides" <pmenso57_at_[hidden]>
>>
>> > Just my 2 cents.
>>
>> Make that 3 cents...
>>
>> In summary, enumerations are distinct types and therefore can interfere
> with
>> the rest of the language. Particularly, constant expressions,
> overloading,
>> operator overloading, template type deduction, etc.. Personally, I think
>> that is a strong case *against* using enumerations.
>
> I agree.
>
> And since there are techniques for making out-of-class definitions easier
> (and automatic), which may be instantiated if needed, like you showed, then
> static const seems clearly best.
That's not nearly so easy to take care of if the metafunction in
question is something like alignment_of<T> which could potentially
have lots of values, depending on the T chosen.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk