$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Thomas Maeder (maeder_at_[hidden])
Date: 2000-11-14 13:30:03
Martin Schürch wrote:
>
> int main()
> {
> {
> int value = 0;
> {
> boost::auto_restorer restorer = boost::make_restorer(value,
> 10);
> assert(value==0);
> value = 19;
> assert(value==19);
> }
> assert(value == 10);
> }
> }
There seems to be a portability issue with (at least the latest version of)
C++ Builder which fails to properly destruct such temporaries if their scope
is left because of an exception. I didn't test, but this is what I got from
a thread in borland.public.cppbuilder.language