Hello,
I wanted to know if such code was possible :
alias Operation = Algebraic!(/* All type that implements X UDA */)
struct X
{
int opcode;
Operation h;
}
@X(0x01, Hello(3))
@X(0x02, Hello(4))
struct Hello
{
int Hello;
}
@X(0x03, Toto(5))
@X(0x05, Toto(6))
struct Toto
{
int A
On Friday, 15 June 2018 at 07:27:22 UTC, Simen Kjærås wrote:
On Thursday, 14 June 2018 at 19:15:38 UTC, uknys wrote:
[...]
First off - Algebraic doesn't work at compile-time[0]:
// Error: memcpy cannot be interpreted at compile time, because
it has no available source code
enum a = Algebrai
On Friday, 15 June 2018 at 12:03:28 UTC, Simen Kjærås wrote:
On Friday, 15 June 2018 at 10:53:35 UTC, uknys wrote:
On Friday, 15 June 2018 at 07:27:22 UTC, Simen Kjærås wrote:
[snip]
Yeah I saw that Algebraic doesn't work at compile time, then I
thought of using an Interface with one functio