|
Boost Users : |
Subject: Re: [Boost-users] Needs advices on design ( mpl or processor )
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-01-09 13:01:23
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:
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net