opDispatch and UFCS

cal callumenator at gmail.com
Tue Jul 2 17:04:19 PDT 2013


On Tuesday, 2 July 2013 at 11:04:20 UTC, Artur Skawina wrote:
> To avoid this kind of issues:
>
>    struct S {
>        template opDispatch(string s) if (s.startsWith("foo")) {
>            void opDispatch(T...)(T t) {
>                writeln(s);
>            }
>        }
>    }

That's a handy workaround, thank you.


More information about the Digitalmars-d-learn mailing list