On Wednesday, 16 February 2022 at 19:35:00 UTC, jmh530 wrote:
[snip]
Step 1: In the integral overloads, use allSatisfy!(isSigned, B,
E) || allSatisfy!(isUnsigned, T, U) for the current behavior
Step 2: When !(allSatisfy!(isSigned, B, E) ||
allSatisfy!(isUnsigned, T, U)), then convert to
On Wednesday, 16 February 2022 at 15:55:55 UTC, bachmeier wrote:
On Wednesday, 16 February 2022 at 15:21:11 UTC, jmh530 wrote:
On Tuesday, 15 February 2022 at 22:24:53 UTC, bachmeier wrote:
[snip]
After looking at the documentation and seeing
CommonType!(int, uint) is uint, I have to say
On Wednesday, 16 February 2022 at 15:21:11 UTC, jmh530 wrote:
On Tuesday, 15 February 2022 at 22:24:53 UTC, bachmeier wrote:
[snip]
After looking at the documentation and seeing CommonType!(int,
uint) is uint, I have to say that iota's behavior doesn't make
much sense.
What do you propose
On Tuesday, 15 February 2022 at 22:24:53 UTC, bachmeier wrote:
[snip]
After looking at the documentation and seeing CommonType!(int,
uint) is uint, I have to say that iota's behavior doesn't make
much sense.
What do you propose as an alternative? What about the narrowest
type that fits
On Wednesday, 16 February 2022 at 02:51:32 UTC, Era Scarecrow
wrote:
On Tuesday, 15 February 2022 at 22:24:53 UTC, bachmeier wrote:
On Tuesday, 15 February 2022 at 22:02:13 UTC, Adam D Ruppe
wrote:
for(a = v.length; a > cast(size_t) -1, a += -1)
After looking at the documentation and seeing
On Tuesday, 15 February 2022 at 22:24:53 UTC, bachmeier wrote:
On Tuesday, 15 February 2022 at 22:02:13 UTC, Adam D Ruppe
wrote:
for(a = v.length; a > cast(size_t) -1, a += -1)
After looking at the documentation and seeing CommonType!(int,
uint) is uint, I have to say that iota's behavior
On Tuesday, 15 February 2022 at 22:02:13 UTC, Adam D Ruppe wrote:
On Tuesday, 15 February 2022 at 21:48:29 UTC, bachmeier wrote:
writeln(iota(v.length,-1,-1));
This would be like
for(a = v.length; a > cast(size_t) -1, a += -1)
That (cast(size_t) -1) is the same as thing.max, meaning a
On Tuesday, 15 February 2022 at 21:48:29 UTC, bachmeier wrote:
writeln(iota(v.length,-1,-1));
This would be like
for(a = v.length; a > cast(size_t) -1, a += -1)
That (cast(size_t) -1) is the same as thing.max, meaning a will
never be greater than it.
Why does the first argument to
This code
```
import std.conv, std.range, std.stdio;
void main() {
auto v = [1, 2, 3, 4, 5];
writeln(iota(v.length,-1,-1));
writeln(iota(v.length,-1.to!long,-1));
writeln(iota(v.length.to!int,-1,-1));
writeln(iota(v.length.to!uint,-1,-1));