digitalmars.D - std.string.toString() with radix function
- Phoenix (11/11) Jun 02 2005 socket.d(111): function std.string.toString called with argument types:
- Uwe Salomon (5/16) Jun 02 2005 The parameter 16 is signed int by default. D has far simpler overloading...
- Phoenix (2/27) Jun 02 2005 thanks, it works fine.
socket.d(111): function std.string.toString called with argument types: (ulong,int) matches both: std.string.toString(long,uint) and: std.string.toString(ulong,uint) code: int i = 15; char [] ui; ui = std.string.toString(cast(ulong)i,16); what`s up with it?
Jun 02 2005
socket.d(111): function std.string.toString called with argument types: (ulong,int) matches both: std.string.toString(long,uint) and: std.string.toString(ulong,uint) code: int i = 15; char [] ui; ui = std.string.toString(cast(ulong)i,16); what`s up with it?The parameter 16 is signed int by default. D has far simpler overloading rules than C++, and these produce the collision here. Use that instead: ui = std.string.toString(cast(ulong)i, 16u); Ciao uwe
Jun 02 2005
Uwe Salomon napsal(a):thanks, it works fine.socket.d(111): function std.string.toString called with argument types: (ulong,int) matches both: std.string.toString(long,uint) and: std.string.toString(ulong,uint) code: int i = 15; char [] ui; ui = std.string.toString(cast(ulong)i,16); what`s up with it?The parameter 16 is signed int by default. D has far simpler overloading rules than C++, and these produce the collision here. Use that instead: ui = std.string.toString(cast(ulong)i, 16u); Ciao uwe
Jun 02 2005