$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Shunsuke Sogame (mb2act_at_[hidden])
Date: 2006-04-29 08:19:06
Alberto Ganesh Barbati wrote:
> Shunsuke Sogame ha scritto:
> 
>>I note user workaround:
>>
>>     struct xxx : std::vector<int>
>>     {
>>         void test()
>>         {
>>             foreach(*this);
>>         }
>>
>>         template< class SelfT >
>>         void foreach(SelfT& self)
>>         {
>>             BOOST_FOREACH (int x, self) {
>>             }
>>         }
>>     };
>>
> 
> 
> A much simpler workaround that compiles under VC7.1 is:
> 
> struct xxx : std::vector<int>
> {
>     void test()
>     {
>         xxx* This = this;
> 
>         BOOST_FOREACH(int x, *This)
>         {
>         }
>     }
> };
Doh!
A mysterious reason prevented me from writing even self type...
Bug makes bug. :-)
Thanks again!
-- Shunsuke Sogame