On Saturday, 4 January 2014 at 19:19:43 UTC, Gary Willoughby wrote:
On Saturday, 4 January 2014 at 19:17:31 UTC, Gary Willoughby wrote:
OMG i've just found opDispatch!

http://dlang.org/operatoroverloading.html#Dispatch

Fantastic!

How to handle returning a value from a non-existent property?

Got it!

        public void opDispatch(string s)(string value)
        {
                // handle.
        }

        public string opDispatch(string s)()
        {
                return "value";
        }

Reply via email to