[Issue 1623] Overloading on different parameters numbers gratuitously restrictive.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 8 13:49:52 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1623
smjg at iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
------- Comment #1 from smjg at iname.com 2007-11-08 15:49 -------
This doesn't seem to have anything to do with overloading. As I try it (DMD
1.023 and 2.007 alike, Windows) the code you've posted compiles without error.
However, if I trying adding this code:
void main() {
uniformInt(2, 3);
}
then I get
bz1623.d(2): struct bz1623.uniformInt(IntType) is not a function template
bz1623.d(9): struct bz1623.uniformInt(IntType) cannot deduce template function
f
rom argument types (int,int)
Nothing to do with overloading, but that it's a struct template, not a function
template. If I cut down the example
----------
struct uniformInt(IntType) {
static uniformInt opCall()(IntType min);
}
void main() {
uniformInt(42);
}
----------
then I get basically the same errors.
What errors do you get when you try it under Linux?
--
More information about the Digitalmars-d-bugs
mailing list