
On Sat 07/01/2012 08:42 Allan Nielsen wrote:-
I will try to illustrate my design problem in a more simple example:
struct TagA { enum Size { size = 4 }; enum E { A0 = 0, A1 = 1, A2 = 2, A3 = 3, }; }; ...
I've been following this thread despite being a total novice with mpl (and template meta-programming in general). However I'm not quite sure why you are trying to pass the offset through the templates in the 1st place - can't you just use standard : syntax and let the compiler work out the offsets?
Eg
enum A { A0,A1,A2,A3,A4 };
enum B { B0,B1,B2,B3,B4 };
template