On Wednesday, 22 February 2023 at 20:20:46 UTC, Dark Hole wrote:
```d
template Foo(T, alias T[] Array) {
// ...
}
// ...
Bar[] arr;
Foo!(Bar, arr);
```
This is valid D, but it doesn't work. It gives error "Error:
template instance `Foo!(Bar, arr)` does not match template
declaration `Foo(T
I'm trying to rewrite really old D code. There was fragment like
that:
```d
template Foo(T, T[] Array) {
// ...
}
// ...
Bar[] arr;
Foo!(Bar, arr);
```
This gives error `can't read arr in compile time`. Small changes:
```d
template Foo(T, alias T[] Array) {
// ...
}
// ...
Bar[] arr;
Foo
On Wednesday, 22 February 2023 at 15:00:56 UTC, WebFreak001 wrote:
I just first time used importC in a prototype project I just
worked on. I used it to just import `libevdev.h` on linux to
register a custom input device / make a simple userspace input
driver.
A suggestion: try tcc as preproce
I just first time used importC in a prototype project I just
worked on. I used it to just import `libevdev.h` on linux to
register a custom input device / make a simple userspace input
driver.
Now libevdev comes with two header files: libevdev.h and
libevdev-uinput.h
Q1) Since libevdev-uinp
On Tuesday, 21 February 2023 at 12:32:51 UTC, Adam D Ruppe wrote:
On Tuesday, 21 February 2023 at 02:41:34 UTC, Elfstone wrote:
apparently F.stringof
You almost never want to use .stringof, instead try
__traits(identifier, F) and see what it gives you.
Alternatively, loop over __traits(all