[Issue 17444] std.traits.isCallable doesn't recognize struct member function if return type is 'auto'.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 27 04:15:21 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17444
--- Comment #2 from Dario Schiavon <dario.schiavon at gmail.com> ---
(In reply to uplink.coder from comment #1)
> This has to do with the order of symbol resolving.
> You will see that it will print good, if you put the static if outside of
> the struct body.
Thanks for the prompt answer. Do you mean that this is the intended behavior,
or is it still a bug?
I'll explain what I'm trying to achieve: a mixin template that will
automatically define a member function foo if it is not already present.
However, the fact that it works in some situations and not in others is mildly
annoying. Maybe you can suggest a better approach?
--
More information about the Digitalmars-d-bugs
mailing list