$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Henrik Kuhn (henrik.kuhn_at_[hidden])
Date: 2001-11-21 11:43:45
George,
strange, Borland doesn't plaim me on in the swap part. And debugging 
shows me the behavior I want.
> >   for(std::size_t i=0; i<v.size(); ++i)
> >     v[i].swap( foo_ptr_t(new foo(i)) );
> 
> This is not legal, since swap must take a non-const reference and 
> you are creating a temporary here. g++ 3.0.2 complained. I replaced 
> this with;
> 
>   for(std::size_t i=0; i<v.size(); ++i) {
>     foo_ptr_t new_foo(new foo(i));
>     v[i].swap( new_foo );
>   }
> 
> and it compiled fine.
> In that message I supplied a patch, which has been applied in the 
> CVS version and  looks like it made it into 1.25.1.
> ...
> If you applied the patch and it still doesn't compile, then 
> there is probably some other problem related to Borland's
> compiler's idiosyncracies...
I'm allready using boost 1.25.1 and this let me think worse about the 
borland compilers idiosyncracies. But nevertheless perhaps somebody 
has a solution hand.
Thanks,
Henrik