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



--- Comment #2 from Don <clugd...@yahoo.com.au> 2012-11-16 00:33:22 PST ---
Here's the first example from
http://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error
translated into D.

---------------
struct Test {
    alias int foo;
}

void f(T)(T.foo x) {} // Definition #1

void f(T)(T x) {}    // Definition #2

void main() {
    f!(Test)(10); // Call #1.
    f!(int)(10);  // C++ No error (even though there is no int::foo) thanks to
SFINAE.
}
------------
bug.d(5): Error: no property 'foo' for type 'int'
bug.d(5): Error: T.foo is used as a type
------------
Same thing with every other SFINAE example I've been able to find. The
behaviour is the same on D1 and D2.
Does D actually have SFINAE???

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

Reply via email to