
On 01/09/12 03:27, Allan Nielsen wrote:
Hi
Sorry, I have been away from my computer doing the weekend. I'm looking at your suggested code, and the questions you have raised now. I will answer as soon as possible.
Best regards Allan W. Nielsen
The attached has output which shows the structure of the type and shows that the last Enum passed to template has least offset, which you might find counterintuitive. The only solution I can think of is to reverse the args. The attached also uses: http://svn.boost.org/svn/boost/sandbox/variadic_templates/boost/iostreams/ut... If you don't want to bother to download that, then just comment out the indent_buf_{in,out} and the indent_outbuf declaration. The output is: ./build/gcc4_7v/boost-svn/ro/trunk/sandbox/rw/variadic_templates/sandbox/compressed_enums/compressed_enums.exe :eos_t::offset=9 :get_ol(T1)=0 :get_ol(T2)=0 :get_ol(T3)=0 :get<T3>=0 putting: :get<T1>=1 :get<T2>=2 :get<T3>=3 compressed_enums_impl < Derived, pair< T1, E1> , compressed_enums_impl < Derived, pair< T2, E2> , compressed_enums_impl < Derived, pair< T3, E3> , compressed_enums_impl < Derived >::offset=0 >::offset=4
::offset=7 ::offset=9
Compilation finished at Mon Jan 9 11:55:18