From ef252ccc495516d1915fb58955be286d00a40080 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Sat, 24 Jan 2015 23:27:29 +0000 Subject: [PATCH] bind_dm_test Add special code for gcc 5.0 optimized --- test/boost_bind_compatibility/bind_dm_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/boost_bind_compatibility/bind_dm_test.cpp b/test/boost_bind_compatibility/bind_dm_test.cpp index 8df1659..fcf699d 100644 --- a/test/boost_bind_compatibility/bind_dm_test.cpp +++ b/test/boost_bind_compatibility/bind_dm_test.cpp @@ -71,7 +71,11 @@ int main() int const v = 42; +#if defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 50000) && __OPTIMIZE__ + // Change bind_dm_test.cpp to bind to _1 twice. + BOOST_TEST( bind( &X::m, _1)( bind( f, _1 )( v ) ) == v ); +#else BOOST_TEST( bind( &X::m, bind( f, _1 ) )( v ) == v ); - +#endif return boost::report_errors(); }