|
Boost : |
Subject: Re: [boost] boost] Attn metaprogrammers! [Better Enums] More complete release - feedback requested
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2015-06-09 20:18:57
On 10/06/2015 06:42, Anton Bachin wrote:
>> On Jun 8, 2015, at 23:30, Gavin Lambert <gavinl_at_[hidden]> wrote:
>> The other interesting thing that you could do though was to have separate tables
>> for separate contexts. So for example with the same actual enum, you could use
>> one string table when reading/writing JSON and a different table when
>> reading/writing XML -- or one string for internal use and another string for
>> user display. That sort of thing. (Although there are better ways to handle the
>> latter, especially once you start considering multiple languages.)
>
> I think this is the only thing thatâs not straightforward for me to support.
> Iâll give it some thought. There might be something that can be written over the
> core of Better Enums that does this nicely.
It was occasionally useful, but hardly essential. Certainly most
languages that provide built-in enum-to-string conversions don't provide
this. So don't worry about it too much. :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk