Fixed GCC incompatibility
authorkhizmax <libcds.dev@gmail.com>
Fri, 25 Dec 2015 05:23:29 +0000 (08:23 +0300)
committerkhizmax <libcds.dev@gmail.com>
Fri, 25 Dec 2015 05:23:29 +0000 (08:23 +0300)
tests/test-hdr/set/hdr_intrusive_striped_set.h

index c0218f5a2ed3a8180eae65644bd30fb0f5ec9924..870ceedee39c713df225a7ee83ebedb0c3dd3e1f 100644 (file)
@@ -13,6 +13,24 @@ namespace set {
     namespace ci = cds::intrusive;
     namespace co = cds::opt;
 
+    template <typename T>
+    struct get_int_key
+    {
+        int operator()( T const & v ) const
+        {
+            return v.key();
+        }
+    };
+
+    template <>
+    struct get_int_key<int>
+    {
+        int operator()( int i ) const
+        {
+            return i;
+        }
+    };
+
     // MichaelHashSet
     class IntrusiveStripedSetHdrTest: public CppUnitMini::TestCase
     {
@@ -260,24 +278,6 @@ namespace set {
             }
         };
 
-        template <typename T>
-        struct get_int_key
-        {
-            int operator()( T const & v ) const
-            {
-                return v.key();
-            }
-        };
-
-        template <>
-        struct get_int_key<int>
-        {
-            int operator()( int i ) const
-            {
-                return i;
-            }
-        };
-
         struct less2 {
             template <typename Item>
             bool operator()( Item const& e, find_key const& k ) const