Boost logo

Boost :

From: Marcus Lindblom (macke_at_[hidden])
Date: 2007-09-07 11:48:45


Jeff Garland wrote:
> Marcus Lindblom wrote:
>> Marcus Lindblom wrote:
>>> Hi,
>>>
>>> I have some code that helps with defining iostream-operators for enums.
>>> We use this in our C++<->xml bindings.
>>>
>>> Basically, it's just two maps (string->enum & enum<-string) and some
>>> syntactic sugar. However, I happen to think it is quite neat and so
>>> figured it might be useful to other people too. (And it's always nice to
>>> give something back :)
>>>
>>> So, is this something that would fit in boost?
>> Ping? Am I way off here?
>
> I think there'd be some interest. Basically enums without a string mapping
> aren't much use -- and there was interest in boost_enum and other enum related
> helpers.

I didn't know about the previous Boost.Enum proposal. It seems to be
abandoned. I'll have to dig through the archives to see what happened
with it.

However, my "lib" is much smaller in scope, intentionally.

> BTW, in case you aren't aware you can use boost.bimap so you should only need
> one map.

Yes. It's not there because we haven't switched to boost 1.34 yet (will
do soon) so I haven't had access to it.

Cheers,
/Marcus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk