On Sunday, 1 December 2024 at 21:35:43 UTC, monkyyy wrote:
On Sunday, 1 December 2024 at 20:29:30 UTC, realhet wrote:

Update: This not works!

You have more code in that one file then I try to have in a *project*, so idk but if your still looking at the file, may as well say my thing

The reason for my big modules is this:
I build them in parallel, one module = one LDC instance. So I just can't have a module for every sneeze :D (Until I make possible to group them...)

To compensate it, I have a lot of region blocks: version(/+$DIDE_REGION region caption+/all){} I use those to make a hierarchical order inside large modules. These are files, they can be nested.


enum isNumberic(T:Vector!(S,N),S,size_T N)=true;

Thanks for the example code, I was surprised that it runs. This crazy enum format with the separate =true and =false was new to me. I've checked isNumeric(), and the same stuff is inside that.

I use this format:
```d
enum isVector(T) = is(T==Vector!(CT, N), CT, int N);
enum isScalar(T) = is(T==bool) || isNumeric!T;
```

I tried yours, but nothing changed, the current solution to this inter-module template-type-alias problem is:

1. In the target module: 'mentioning' the vector type `auto dummy = Vector!(ubyte, 3)(0);` before using the alias `RGB(1, 2, 3)` 2. In the math module: 'mentioning' it with a `pragma(msg, Vector!(ubyte, 3).stringof[0..0]);` (Only this works, not a dummy declaration.)

Both solutions are lame :D
But the one inside the math module is hidden, so the production modules can contain nice non-redundant code.


  • How can I have t... realhet via Digitalmars-d-learn
    • Re: How can... realhet via Digitalmars-d-learn
      • Re: How... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... realhet via Digitalmars-d-learn
        • Re:... realhet via Digitalmars-d-learn
          • ... realhet via Digitalmars-d-learn
            • ... monkyyy via Digitalmars-d-learn
              • ... realhet via Digitalmars-d-learn

Reply via email to