From 37352998a4c1189ad9235f896604a880f1e79db7 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Thu, 22 Jan 2015 22:37:13 +0000 Subject: [PATCH] bind_rv_sp_test.cpp Modify to give workaround for MSVC 8, 9 & 10 --- test/boost_bind_compatibility/bind_rv_sp_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/boost_bind_compatibility/bind_rv_sp_test.cpp b/test/boost_bind_compatibility/bind_rv_sp_test.cpp index bd97fd2..a364a1b 100644 --- a/test/boost_bind_compatibility/bind_rv_sp_test.cpp +++ b/test/boost_bind_compatibility/bind_rv_sp_test.cpp @@ -60,7 +60,15 @@ int main() Y y; + // MSVC 10,9 and 8 all give a COMDAT error with the full test. + // This also fails: + //boost::shared_ptr xp = bind( &Y::f, &y )(); +#if defined(BOOST_MSVC) && (BOOST_MSVC < 1700) + boost::shared_ptr xp = y.f(); + BOOST_TEST( bind( &X::f, xp)() == 42 ); +#else BOOST_TEST( bind( &X::f, bind( &Y::f, &y ) )() == 42 ); +#endif return boost::report_errors(); }