[Issue 21429] New: Cannot sort large tuple arrays at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 26 13:35:30 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21429
Issue ID: 21429
Summary: Cannot sort large tuple arrays at compile time
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: maxsamukha at gmail.com
import std.algorithm;
import std.typecons;
auto foo() {
enum n = 1000;
auto x = new Tuple!int[n];
x.sort;
return x;
}
enum a = foo;
void main() {
}
/dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/mutation.d(2825): Error:
reinterpreting cast from Tuple!int* to ubyte* is not supported in CTFE
Compiles for n == 100.
--
More information about the Digitalmars-d-bugs
mailing list