[C++-sig] Re: problem with Boost.Python enum with duplicate values
David Abrahams
dave at boost-consulting.com
Thu Oct 2 22:29:55 CEST 2003
"Niall Douglas" <s_sourceforge at nedprod.com> writes:
> On 2 Oct 2003 at 11:40, scott snyder wrote:
>
>> Looking at the code in enum.cpp, is see that it keeps the enum items
>> in a map indexed by the value --- so values added later overwrite any
>> added earlier.
>>
>> It's common to use C++ enums to define small integral constants,
>> in addition to using them for things which are actual enumerations. So
>> the case of multiple enum symbols with the same value really should be
>> supported.
>
> I completely agree. Perhaps a reimplementation of enum.cpp Dave?
Something's in order. I'm not very fond of Scott's specific patch,
though (sorry). I'll give it some thought.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list