|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54619 - in trunk: boost/function libs/function/test
From: daniel_james_at_[hidden]
Date: 2009-07-03 18:22:03
Author: danieljames
Date: 2009-07-03 18:22:03 EDT (Fri, 03 Jul 2009)
New Revision: 54619
URL: http://svn.boost.org/trac/boost/changeset/54619
Log:
Work around Visual C++ copy constructor bug. Fixes #2929.
Based on the patch by Steven Watanabe.
Text files modified:
trunk/boost/function/function_base.hpp | 6 ++++++
trunk/libs/function/test/allocator_test.cpp | 4 ++++
2 files changed, 10 insertions(+), 0 deletions(-)
Modified: trunk/boost/function/function_base.hpp
==============================================================================
--- trunk/boost/function/function_base.hpp (original)
+++ trunk/boost/function/function_base.hpp 2009-07-03 18:22:03 EDT (Fri, 03 Jul 2009)
@@ -262,6 +262,12 @@
A(a)
{
}
+
+ functor_wrapper(const functor_wrapper& f) :
+ F(static_cast<const F&>(f)),
+ A(static_cast<const A&>(f))
+ {
+ }
};
/**
Modified: trunk/libs/function/test/allocator_test.cpp
==============================================================================
--- trunk/libs/function/test/allocator_test.cpp (original)
+++ trunk/libs/function/test/allocator_test.cpp 2009-07-03 18:22:03 EDT (Fri, 03 Jul 2009)
@@ -128,6 +128,10 @@
BOOST_CHECK(dealloc_count == 0);
fv.assign( &do_nothing, std::allocator<int>() );
fv.clear();
+
+ function0<void> fv2;
+ fv.assign(&do_nothing, std::allocator<int>() );
+ fv2.assign(fv, std::allocator<int>() );
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk