Boost logo

Boost :

Subject: Re: [boost] [function] bug
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-02-10 16:12:45


Shouldn't this be accomplished with a destructor? No ifdefs would be
needed in that case.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode

On Tue, Feb 10, 2009 at 12:42 PM, Okko Willeboordse
<okko.willeboordse_at_[hidden]> wrote:
> Applies for 1.37 and 1.38.
> Using VS2008, SDK 6.1
>
> See ...\function\function_template.hpp
>
> 945 #if !defined(BOOST_NO_EXCEPTIONS)
> 946 try {
> 947 #endif
> 948 if (!f.empty()) {
> 949 this->vtable = f.vtable;
> 950 f.vtable->manager(f.functor, this->functor,
> 951 boost::detail::function::move_functor_tag);
> 952 f.vtable = 0;
> 953 #if !defined(BOOST_NO_EXCEPTIONS)
> 954 } else {
> 955 clear();
> 956 }
> 957 } catch (...) {
> 958 vtable = 0;
> 959 throw;
> 960 }
> 961 #endif
> 962 }
>
> Line
> 953 #if !defined(BOOST_NO_EXCEPTIONS)
> must be moved 3 lines down like;
>
> 945 #if !defined(BOOST_NO_EXCEPTIONS)
> 946 try {
> 947 #endif
> 948 if (!f.empty()) {
> 949 this->vtable = f.vtable;
> 950 f.vtable->manager(f.functor, this->functor,
> 951 boost::detail::function::move_functor_tag);
> 952 f.vtable = 0;
> 953 } else {
> 954 clear();
> 955 }
> 956 #if !defined(BOOST_NO_EXCEPTIONS)
> 957 } catch (...) {
> 958 vtable = 0;
> 959 throw;
> 960 }
> 961 #endif
> 962 }


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk