On Tuesday, 9 April 2024 at 23:50:36 UTC, Richard (Rikki) Andrew Cattermole wrote:
On 10/04/2024 11:21 AM, Liam McGillivray wrote:
On Sunday, 7 April 2024 at 08:59:55 UTC, Richard (Rikki) Andrew Cattermole wrote:
Unfortunately runtime and CTFE are the same target in the compiler.

So that function is being used for both, and hence uses GC (appending).

Are you sure that string appending was really the problem that caused the "TypeInfo" build error? I forgot about this, but I had already had a working CTFE function with string appending before adding the new one that lead to this error. The symbols that it generates could be used in the program compiled with `betterC`.

No, for a string it shouldn't trigger the need for TypeInfo. But that wouldn't have worked regardless.

Array appending calls a runtime function which accepts `TypeInfo` (In this case, `TypeInfoGeneric!char`). So this does indeed involve `TypeInfo`. But also, even if `TypeInfo` weren't involved, it also needs the GC which is unavailable with betterC. It's just that the `TypeInfo` error happens first.

The move to use templates instead of `TypeInfo` is slowly happening.

-Steve
    • Re: "E... Liam McGillivray via Digitalmars-d-learn
      • Re: &qu... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Liam McGillivray via Digitalmars-d-learn
          • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
            • ... Liam McGillivray via Digitalmars-d-learn
              • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
    • Re: "E... Liam McGillivray via Digitalmars-d-learn
      • Re: &qu... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Liam McGillivray via Digitalmars-d-learn
          • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Steven Schveighoffer via Digitalmars-d-learn
  • Re: "Error:... Kagamin via Digitalmars-d-learn

Reply via email to