From 3684114e4bf396e97ee528533449d19e7d5ad570 Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 27 Jan 2016 00:16:09 +0300 Subject: [PATCH] Added workaround for boost 1.59 bug: intrusive containers require implicit conversion from value_type to key_type --- tests/test-hdr/set/hdr_intrusive_striped_set.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test-hdr/set/hdr_intrusive_striped_set.h b/tests/test-hdr/set/hdr_intrusive_striped_set.h index b2e3e24d..4cba53fb 100644 --- a/tests/test-hdr/set/hdr_intrusive_striped_set.h +++ b/tests/test-hdr/set/hdr_intrusive_striped_set.h @@ -34,6 +34,16 @@ #include "cppunit/cppunit_proxy.h" #include +#include + +// boost 1.59 bug: intrusive containers require implicit conversion from value_type to key_type +// Fixed in boost 1.60+ +#if BOOST_VERSION == 105900 +# define CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND +#else +# define CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND explicit +#endif + // cds::intrusive namespace forward declaration namespace cds { namespace intrusive {}} @@ -129,7 +139,8 @@ namespace set { base_item() {} - explicit base_item( int key ) + CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND + base_item( int key ) : item( key ) {} @@ -158,7 +169,8 @@ namespace set { member_item() {} - explicit member_item( int key ) + CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND + member_item( int key ) : item( key ) {} -- 2.34.1