[Issue 1951] Remove SFINAE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 16 00:53:12 PST 2012


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



--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 2012-11-16 00:53:12 PST ---
(In reply to comment #2)
> ---------------
> 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
> ------------

I think that is not a lack SFINAE, rather the type deduction mechanism issue.
In current, T.foo is not treated as a *partially parameterized* type name.
I recently filed bug 9022 to support such type deduction.

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


More information about the Digitalmars-d-bugs mailing list