On Monday, 4 September 2017 at 20:54:27 UTC, EntangledQuanta wrote:
On Monday, 4 September 2017 at 09:23:24 UTC, Andrea Fontana wrote:
On Thursday, 31 August 2017 at 23:17:52 UTC, EntangledQuanta wrote:
Generally one has to use a switch to map dynamic components. Given a set X and Y one can form a switch to map X to Y:

[...]

Does this work for you?
https://dpaste.dzfl.pl/e2669b595539

Andrea

No, do you realize you are passing those enums at compile time? It won't work if they are "runtime" variables, which is the whole point of doing all this. You've essentially make a simple problem complicated. Why not just overload foo properly?

So at runtime you can do in a couple of ways if i'm right:
http://dpaste.com/02W9FX6

Andrea

Reply via email to