Can't print enum values
Andrey
saasecondbox at yandex.ru
Fri Aug 31 12:50:54 UTC 2018
On Friday, 31 August 2018 at 12:21:48 UTC, aliak wrote:
> auto ToUnderlyingType(alias a)() {
> return cast(OriginalType!(typeof(a)))a;
> }
>
> void print(T...)(T args) {
> writeln(staticMap!(ToUnderlyingType, args));
> }
Oohhh. So easy! Killed 2 days - and templates and mixins tried...
And the solution was to use TEMPLATE function with alias not
regular...
Thank you!
More information about the Digitalmars-d-learn
mailing list