24 Feb
2014
24 Feb
'14
5:55 p.m.
On 24 February 2014 14:28, Larry Evans
On 02/24/14 05:04, Krzysztof Czainski wrote:
2014-02-24 11:55 GMT+01:00 MM
mailto:finjulhich@gmail.com>: Hello,
I just wanted to confirm there's no provided method to get the n'th element of say a fusion vector where n is known at runtime, except of handling it explicitkly with a switch case?
Thanks
MM
If such a function existed, what return type would it have?
Regards, Kris
What about: variant
get(unsigned n, vector ) ? For example: vector
vec(T1(),T2(),T3()); variant var; var = get(2,vec); assert(var.which(),2); -regards, Larry
Possible, a variant over the unique types in the sequence. What would the impl look like though?
MM