[Issue 5896] const overload matching is succumb to template parameter one
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 29 08:54:58 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5896
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-04-29 08:51:07 PDT ---
I don't understand why case 2a,2b works.
It seems to me that case 1 is identical to:
struct X{}
T foo(T)(const(X) _this) { return 10; }
T foo(T)(X _this) { return 11; }
void main(){
auto xm = X();
assert(foo!int(xm)==11);
}
Which fails in exactly the same way.
--
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