Is it possible to handle 'magic' property assignments a'la PHP?
TheFlyingFiddle
kurtyan at student.chalmers.se
Sun Jan 5 13:19:20 PST 2014
On Sunday, 5 January 2014 at 17:17:27 UTC, Artur Skawina wrote:
> While 'void' is not a first class type in D, there /is/ a
> special
> case for returning 'void' from functions - so all of the above
> can
> simply be written as:
>
> struct gl {
> static auto ref opDispatch(string name, Args...)(Args
> args) {
> scope (exit) checkGLError();
> return mixin("gl"~name~"(args)");
> }
> }
>
> artur
That's awesome! Thanks for enlightening me!
More information about the Digitalmars-d-learn
mailing list