It looks like certain aspects of CTFE are disabled when building with -betterC. I assume this is a bug?
```
struct Vector2 {
int x, y;
}
extern(C) void main() {
import std.algorithm : map;
import std.range : join;
import std.traits : FieldNameTuple;
enum fragment = [FieldNameTuple!Vector2].map!(field => "0.").join(",");
Vector2 zero = mixin("Vector2(" ~ fragment ~ ")");
}
```
When compiled with `dmd -betterC betterc.exe .\betterc.d`, I get:
```
.\betterc.d(9): Error: none of the overloads of template `std.array.join` are callable using argument types `!()(MapResult!(__lambda1, string[]), string)`
dmd\current\windows\bin64\..\..\src\phobos\std\array.d(2125): Candidates are: `join(RoR, R)(RoR ror, R sep)`
with `RoR = MapResult!(__lambda1, string[]),
R = string`
must satisfy the following constraint:
` isInputRange!(Unqual!(ElementType!RoR))`
dmd\current\windows\bin64\..\..\src\phobos\std\array.d(2228): `join(RoR, E)(RoR ror, scope E sep)`
with `RoR = MapResult!(__lambda1, string[]),
E = string`
must satisfy the following constraint:
` isInputRange!(Unqual!(ElementType!RoR))`
dmd\current\windows\bin64\..\..\src\phobos\std\array.d(2321): `join(RoR)(RoR ror)`
```
Comment #1 by robert.schadek — 2024-12-13T19:25:30Z