From 9c0b2a877667a1b7f463bae864f1b2045a7de1f3 Mon Sep 17 00:00:00 2001 From: khizmax Date: Mon, 6 Apr 2015 19:56:19 +0300 Subject: [PATCH] set2 unit test: fixed GCC incompatibility --- tests/unit/set2/set_type_cuckoo.h | 11 ++++++----- tests/unit/set2/set_type_ellen_bintree.h | 9 +++++---- tests/unit/set2/set_type_michael.h | 8 ++++---- tests/unit/set2/set_type_skip_list.h | 8 ++++---- tests/unit/set2/set_type_split_list.h | 8 ++++---- tests/unit/set2/set_type_std.h | 8 ++++---- tests/unit/set2/set_type_striped.h | 10 ++++++---- 7 files changed, 33 insertions(+), 29 deletions(-) diff --git a/tests/unit/set2/set_type_cuckoo.h b/tests/unit/set2/set_type_cuckoo.h index bd868bd2..3245de90 100644 --- a/tests/unit/set2/set_type_cuckoo.h +++ b/tests/unit/set2/set_type_cuckoo.h @@ -33,11 +33,12 @@ namespace set2 { struct set_type< cds::intrusive::cuckoo::implementation_tag, Key, Val >: public set_type_base< Key, Val > { typedef set_type_base< Key, Val > base_class; - using base_class::key_val; - using base_class::compare; - using base_class::less; - using base_class::hash; - using base_class::hash2; + typedef typename base_class::key_val key_val; + typedef typename base_class::compare compare; + typedef typename base_class::equal_to equal_to; + typedef typename base_class::less less; + typedef typename base_class::hash hash; + typedef typename base_class::hash2 hash2; // *************************************************************************** // CuckooSet diff --git a/tests/unit/set2/set_type_ellen_bintree.h b/tests/unit/set2/set_type_ellen_bintree.h index 2a5b1732..23cee387 100644 --- a/tests/unit/set2/set_type_ellen_bintree.h +++ b/tests/unit/set2/set_type_ellen_bintree.h @@ -17,10 +17,11 @@ namespace set2 { struct set_type< cc::ellen_bintree::implementation_tag, Key, Val >: public set_type_base< Key, Val > { typedef set_type_base< Key, Val > base_class; - using base_class::key_val; - using base_class::compare; - using base_class::less; - using base_class::hash; + typedef typename base_class::key_type key_type; + typedef typename base_class::key_val key_val; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::key_less key_less; struct ellen_bintree_props { struct key_extractor { diff --git a/tests/unit/set2/set_type_michael.h b/tests/unit/set2/set_type_michael.h index 4d66236c..2df4f2c6 100644 --- a/tests/unit/set2/set_type_michael.h +++ b/tests/unit/set2/set_type_michael.h @@ -17,10 +17,10 @@ namespace set2 { struct set_type< cc::michael_set::implementation_tag, Key, Val >: public set_type_base< Key, Val > { typedef set_type_base< Key, Val > base_class; - using base_class::key_val; - using base_class::compare; - using base_class::less; - using base_class::hash; + typedef typename base_class::key_val key_val; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::hash hash; // *************************************************************************** // MichaelHashSet based on MichaelList diff --git a/tests/unit/set2/set_type_skip_list.h b/tests/unit/set2/set_type_skip_list.h index 27e31038..30873cf9 100644 --- a/tests/unit/set2/set_type_skip_list.h +++ b/tests/unit/set2/set_type_skip_list.h @@ -17,10 +17,10 @@ namespace set2 { struct set_type< cc::skip_list::implementation_tag, Key, Val >: public set_type_base< Key, Val > { typedef set_type_base< Key, Val > base_class; - using base_class::key_val; - using base_class::compare; - using base_class::less; - using base_class::hash; + typedef typename base_class::key_val key_val; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::hash hash; class traits_SkipListSet_less_pascal: public cc::skip_list::make_traits < co::less< less > diff --git a/tests/unit/set2/set_type_split_list.h b/tests/unit/set2/set_type_split_list.h index dfbbc12f..13b9e397 100644 --- a/tests/unit/set2/set_type_split_list.h +++ b/tests/unit/set2/set_type_split_list.h @@ -23,10 +23,10 @@ namespace set2 { struct set_type< cc::split_list::implementation_tag, Key, Val >: public set_type_base< Key, Val > { typedef set_type_base< Key, Val > base_class; - using base_class::key_val; - using base_class::compare; - using base_class::less; - using base_class::hash; + typedef typename base_class::key_val key_val; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::hash hash; // *************************************************************************** // SplitListSet based on MichaelList diff --git a/tests/unit/set2/set_type_std.h b/tests/unit/set2/set_type_std.h index fd441be0..04738181 100644 --- a/tests/unit/set2/set_type_std.h +++ b/tests/unit/set2/set_type_std.h @@ -189,10 +189,10 @@ namespace set2 { struct set_type< std_implementation_tag, Key, Val >: public set_type_base< Key, Val > { typedef set_type_base< Key, Val > base_class; - using base_class::key_val; - using base_class::compare; - using base_class::less; - using base_class::hash; + typedef typename base_class::key_val key_val; + typedef typename base_class::less less; + typedef typename base_class::hash hash; + typedef typename base_class::equal_to equal_to; typedef StdSet< key_val, less, cds::sync::spin > StdSet_Spin; typedef StdSet< key_val, less, lock::NoLock> StdSet_NoLock; diff --git a/tests/unit/set2/set_type_striped.h b/tests/unit/set2/set_type_striped.h index 38076038..1d3332b1 100644 --- a/tests/unit/set2/set_type_striped.h +++ b/tests/unit/set2/set_type_striped.h @@ -28,10 +28,12 @@ namespace set2 { struct set_type< cc::striped_set::implementation_tag, Key, Val >: public set_type_base< Key, Val > { typedef set_type_base< Key, Val > base_class; - using base_class::key_val; - using base_class::compare; - using base_class::less; - using base_class::hash; + typedef typename base_class::key_val key_val; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::equal_to equal_to; + typedef typename base_class::hash hash; + typedef typename base_class::hash2 hash2; // *************************************************************************** -- 2.34.1