
Hi I have been reading you code, and refactoring my own proposals several times. I'm not used to this kind of meta programming, so it did take me quite some time to understand the code you have proposed, but I'm learning, so thank you.. I will try to answer the questions
Here's where I don't understand why the calculation are done outside the temple and then passed as args to the template. Why not have a template do the calculations and accumulate the results, somewhat like mpl::fold or the code I posted earlier?
This might also be the very core of my problem. I did some tries where I used the c++11 "using" facility to bind all the template arguments except the offset, it did work, but the usage of the interface was not practical. Instead I have now fractured the design to avoid the this calculation outside (like you suggested). This seems to work out better.
The output before the putting: lines is caused by the obviously erroneous initialization of the buffer (no Enum e's stored in the buffer, only unsigned ints). The output after the putting: lines shows the effect of the put
(Enum e). However, be warned! I'm not sure all the casting within the get_ol and put_ol is portable.
Is this about what you want? Pretty much, plus some extra stuff ;-)
- It must be possible to specify arrays of enums - It must be possible to group enums. But I think I got some ideas to move on, so thanks a lot. Best regards Allan W. Nielsen