
21 May
2008
21 May
'08
9:13 a.m.
Am Mittwoch 21 Mai 2008 10:55:53 schrieb Hansi:
Okay this version is working. The problem is that I have a fixed defined tuple and for that the tuple is not defined inside a template struct. for that I get the error that typename can be used only inside a template declaration...
The compiler is right, omit the typename keyword if you're not inside a template. In this case you can even write tup.get<enumFoo>() instead of tup.template get<enumFoo>() The good thing about this syntax get<Whatever>(tup) is, it work always, inside a template or not. -- Maik