Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
August 07, 2011 [Issue 6447] New: iota(BigInt) too | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6447 Summary: iota(BigInt) too Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-08-06 19:56:56 PDT --- Sometimes I'd like to generate a range of bigints too: Enhancement: import std.bigint: BigInt; import std.range: iota; void main() { auto x = iota(BigInt(10)); } Currently DMD gives: ...\std\range.d(4028): Error: template std.range.iota(B,E,S) if ((isIntegral!(CommonType!(B,E)) || isPointer!(CommonType!(B,E))) && isIntegral!(S)) does not match any function template declaration ...\std\range.d(4028): Error: template std.range.iota(B,E,S) if ((isIntegral!(CommonType!(B,E)) || isPointer!(CommonType!(B,E))) && isIntegral!(S)) cannot deduce template function from argument types !()(BigInt,BigInt) test.d(4): Error: template instance std.range.iota!(BigInt) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 07, 2011 [Issue 6447] iota(BigInt) too | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6447 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg@gmx.com --- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2011-08-06 20:05:50 PDT --- BigInt isn't considered an integral by isIntegral, hence why it doesn't work. We should probably look at having a template in std.traits which covers both the built-in integral types and BigInt so that those functions which can work with both have an easy way to test for it. It's either that or every function that could use BigInt is going to have to test for it explicitly on top of testing for isIntegral. Regardless, I don't see any reason why using iota with BigInt shouldn't be made to work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 28, 2013 [Issue 6447] iota(BigInt) too | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6447 Russel Winder <russel@winder.org.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |russel@winder.org.uk --- Comment #2 from Russel Winder <russel@winder.org.uk> 2013-05-28 11:37:57 BST --- I don't have the time, and likely not the knowledge, to fix this and provide a pull request. Is there anyone who does? This is a two year old problem that means D is not useful for applications using data types other than the hardware types, which is a lot of applications. Is this a symptom of the fact that Phobos is really predicated on use of hardware types more generally? (This comment is really to get me on the cc list as there seems to be a requirement to make a comment in order to add oneself to the cc list :-(( -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 28, 2013 [Issue 6447] iota(BigInt) too | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6447 --- Comment #3 from bearophile_hugs@eml.cc 2013-05-28 04:15:16 PDT --- (In reply to comment #2) > Is this a symptom of the fact that Phobos is really predicated on use of hardware types more generally? I think it's mostly a symptom of D/Phobos not having many contributors :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 19, 2013 [Issue 6447] iota(BigInt) too | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6447 hsteoh@quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh@quickfur.ath.cx --- Comment #4 from hsteoh@quickfur.ath.cx 2013-08-18 22:39:52 PDT --- Related: issue #10762. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation