No we should not support enum types derived from strings

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue May 11 13:56:50 UTC 2021


On 5/11/21 8:14 AM, deadalnix wrote:
> On Tuesday, 11 May 2021 at 12:05:18 UTC, Andrei Alexandrescu wrote:
>>> I'm not sure what's the problem is here. Do you have a concrete example?
>>
>> Of course. A range must implement popFront with the signature:
>>
>> void popFront(ref SomeEnumString s) {
>>     ... please fill in the implementation ...
>> }
> 
> That must be a type error, this is a feature, not a bug. This is not 
> expected to work.
> 

Then enum strings are not ranges, correct?


More information about the Digitalmars-d mailing list