Bitfield-style enum to strings?

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 8 00:11:40 PDT 2015


On Friday, 8 May 2015 at 04:11:36 UTC, Nick Sabalausky wrote:
> On 05/07/2015 09:17 PM, Meta wrote:
>> On Thursday, 7 May 2015 at 21:41:06 UTC, Nick Sabalausky wrote:
>>> On 05/07/2015 05:19 PM, Justin Whear wrote:
>>>>
>>>> T[] members = [ EnumMembers!T ];
>>>>
>>>
>>> Doh! Yup, that works.
>>>
>>> Still, I would think there should be a way to do it without 
>>> allocating
>>> an array. But it's not a huge deal right now though.
>>
>> You could also do `TypeTuple!(EnumMembers!T))` I believe.
>
> filter doesn't seem to like that.

Yeah, sorry, forgot it was supposed to go through a range as well.


More information about the Digitalmars-d-learn mailing list