opDispatch apparently has SFINAE property
Vlad Levenfeld via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jul 29 17:01:10 PDT 2014
opDispatch behaves as though it has SFINAE. When something fails
in the definition (like I am having now, some of the symbols I
used in it hadn't been imported) there won't ever be an error
message, I just get "Error: no property 'bar' for type 'Foo'"
In one case I had to use static ifs and pragmas and static
assert(0) to get error messages out of opDispatch because static
assert messages were being suppressed.
Often I just avoid opDispatch altogether (despite it being a
killer feature otherwise) and just generate code with string
mixins, because they are actually easier to debug (and they are
not easy to debug).
I found this https://issues.dlang.org/show_bug.cgi?id=8387
and cast a vote for it. 4 other people have, too, and the bug has
4 duplicates, and has been open since 2012.
More information about the Digitalmars-d
mailing list