[function] latest optimizations break Borland compiler

The latest optimizations in the function library break on the Borland compiler, which does not recognise a destructor when explicitly invoked through a typedef. I don't have a patch for this one yet, just a quick heads-up. In the worst case, could we add a BOOST_WORKAROUND with the old behaviour? I hope to have a better answer later this week though... -- AlisdairM

AlisdairM wrote:
The latest optimizations in the function library break on the Borland compiler, which does not recognise a destructor when explicitly invoked through a typedef.
I don't have a patch for this one yet, just a quick heads-up. In the worst case, could we add a BOOST_WORKAROUND with the old behaviour?
I hope to have a better answer later this week though...
Note: This change is responsible for the errors in the following libraries too: program options regex (1 test) signals thread -- AlisdairM

AlisdairM wrote:
The latest optimizations in the function library break on the Borland compiler, which does not recognise a destructor when explicitly invoked through a typedef.
I don't have a patch for this one yet, just a quick heads-up. In the worst case, could we add a BOOST_WORKAROUND with the old behaviour?
I hope to have a better answer later this week though...
Actually, the patch appears easier than I first thought. cvs diff -wb -- boost\function\function_base.hpp (in directory E:\sourceforge\devel\boost\) Index: boost/function/function_base.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/function/function_base.hpp,v retrieving revision 1.86 diff -w -b -r1.86 function_base.hpp 288a289,291
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) out_functor->~Functor(); #else
289a293
#endif
-- AlisdairM

Douglas Gregor <doug.gregor@gmail.com> writes:
On Jan 24, 2006, at 2:54 AM, AlisdairM wrote:
Actually, the patch appears easier than I first thought.
Committed. Thanks!
Considering that this same workaround is also needed for vc6 and the #ifdef clutters the code, why aren't we just going with the simple approach and using its more portable clause? -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams <dave@boost-consulting.com> writes:
Douglas Gregor <doug.gregor@gmail.com> writes:
On Jan 24, 2006, at 2:54 AM, AlisdairM wrote:
Actually, the patch appears easier than I first thought.
Committed. Thanks!
Considering that this same workaround is also needed for vc6 and the #ifdef clutters the code, why aren't we just going with the simple approach and using its more portable clause?
I'm making that patch now. Scream if you hate it :) -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (3)
-
AlisdairM
-
David Abrahams
-
Douglas Gregor