http://d.puremagic.com/issues/show_bug.cgi?id=9272



--- Comment #3 from Kenji Hara <[email protected]> 2013-01-05 09:12:16 PST ---
(In reply to comment #2)
> (In reply to comment #1)
> > opDispatch takes precedence and just fails to compile.
> 
> Obviously. But is it really by design?
> 
> This works, where opDispatch does not take precedence:
> ---
> struct Foo {
>     void opDispatch(string s)() {}
> }
> 
> void baz(Foo f) {}
> 
> unittest {
>     Foo foo;
>     foo.baz();     // OK
> }
> ---

Just *template* opDispach is required for operator overloading. Therefore
non-template function is simply ignored.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to