On Tuesday, 15 August 2023 at 12:20:54 UTC, repr_man wrote:
On Tuesday, 15 August 2023 at 07:02:45 UTC, Basile B. wrote:
You can add a kind of tag with the mixin, that will allow to
to test if the type supplied to `f` is well a Base implementor:
Firstly, thank you for your help. This is
On Tuesday, 15 August 2023 at 07:02:45 UTC, Basile B. wrote:
You can add a kind of tag with the mixin, that will allow to to
test if the type supplied to `f` is well a Base implementor:
Firstly, thank you for your help. This is probably the best
solution.
Secondly, I feel very stupid for not
On Tuesday, 15 August 2023 at 02:30:37 UTC, repr_man wrote:
Consider the following template mixin:
```d
mixin template Base()
{
int x(){ return 10; }
}
```
It could be used in a variety of structs as follows:
```d
struct Child
{
mixin Base!();
}
```
Now, let's suppose we write a function
Consider the following template mixin:
```d
mixin template Base()
{
int x(){ return 10; }
}
```
It could be used in a variety of structs as follows:
```d
struct Child
{
mixin Base!();
}
```
Now, let's suppose we write a function with a parameter that
should only be able to take items