mirror of
https://github.com/boostorg/function.git
synced 2025-07-28 11:57:16 +02:00
Work around Visual C++ copy constructor bug. Fixes #2929.
Based on the patch by Steven Watanabe. [SVN r54619]
This commit is contained in:
@ -262,6 +262,12 @@ namespace boost {
|
|||||||
A(a)
|
A(a)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
functor_wrapper(const functor_wrapper& f) :
|
||||||
|
F(static_cast<const F&>(f)),
|
||||||
|
A(static_cast<const A&>(f))
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,6 +128,10 @@ test_main(int, char*[])
|
|||||||
BOOST_CHECK(dealloc_count == 0);
|
BOOST_CHECK(dealloc_count == 0);
|
||||||
fv.assign( &do_nothing, std::allocator<int>() );
|
fv.assign( &do_nothing, std::allocator<int>() );
|
||||||
fv.clear();
|
fv.clear();
|
||||||
|
|
||||||
|
function0<void> fv2;
|
||||||
|
fv.assign(&do_nothing, std::allocator<int>() );
|
||||||
|
fv2.assign(fv, std::allocator<int>() );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user