Fix Intel C++ compiler incompatibility
[libcds.git] / tests / test-hdr / misc / cxx11_atomic_class.cpp
index 7637b72c95a4c4e00428d1afed0dfa47a3d03b9a..cafd6a62ef1dd9f0b7475630ec5e279825d95703 100644 (file)
@@ -365,15 +365,16 @@ namespace misc {
         {
             const atomics::memory_order oLoad = convert_to_load_order( order );
             const atomics::memory_order oStore = convert_to_store_order( order );
+            const atomics::memory_order oExchange = convert_to_exchange_order( order );
 
             CPPUNIT_ASSERT( a.is_lock_free() );
             a.store( false, oStore );
             CPPUNIT_ASSERT( a == false );
             CPPUNIT_ASSERT( a.load( oLoad ) == false );
 
-            CPPUNIT_ASSERT( a.exchange( true, order ) == false );
+            CPPUNIT_ASSERT( a.exchange( true, oExchange ) == false );
             CPPUNIT_ASSERT( a.load( oLoad ) == true );
-            CPPUNIT_ASSERT( a.exchange( false, order ) == true );
+            CPPUNIT_ASSERT( a.exchange( false, oExchange ) == true );
             CPPUNIT_ASSERT( a.load( oLoad ) == false );
 
             bool expected = false;
@@ -394,7 +395,7 @@ namespace misc {
 
             CPPUNIT_ASSERT( a.load( oLoad ) == true );
 
-            CPPUNIT_ASSERT( a.exchange( false, order ) == true );
+            CPPUNIT_ASSERT( a.exchange( false, oExchange ) == true );
         }
 
 
@@ -667,16 +668,6 @@ namespace misc {
         void test_atomic_unsigned_long()        { test_atomic_integral<unsigned long>(); }
         void test_atomic_long_long()            { test_atomic_integral<long long>(); }
         void test_atomic_unsigned_long_long()   { test_atomic_integral<unsigned long long>(); }
-//#if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION >= 40400
-//        void test_atomic_char16_t()             { test_atomic_integral<char16_t>(); }
-//        void test_atomic_char32_t()             { test_atomic_integral<char32_t>(); }
-//#endif
-//        void test_atomic_wchar_t()
-//        {
-//#if CDS_OS_TYPE != CDS_OS_HPUX
-//            test_atomic_integral<wchar_t>();
-//#endif
-//        }
 
         void test_atomic_char_volatile()                 { test_atomic_integral_volatile<char>(); }
         void test_atomic_signed_char_volatile()          { test_atomic_integral_volatile<signed char>(); }
@@ -689,16 +680,6 @@ namespace misc {
         void test_atomic_unsigned_long_volatile()        { test_atomic_integral_volatile<unsigned long>(); }
         void test_atomic_long_long_volatile()            { test_atomic_integral_volatile<long long>(); }
         void test_atomic_unsigned_long_long_volatile()   { test_atomic_integral_volatile<unsigned long long>(); }
-//#if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION >= 40400
-//        void test_atomic_char16_t_volatile()             { test_atomic_integral_volatile<char16_t>(); }
-//        void test_atomic_char32_t_volatile()             { test_atomic_integral_volatile<char32_t>(); }
-//#endif
-//        void test_atomic_wchar_t_volatile()
-//        {
-//#if CDS_OS_TYPE != CDS_OS_HPUX
-//            test_atomic_integral_volatile<wchar_t>();
-//#endif
-//        }
 
         void test_atomic_pointer_void()         { do_test_atomic_pointer_void<false>() ;}
         void test_atomic_pointer_void_volatile(){ do_test_atomic_pointer_void<true>() ;}
@@ -732,11 +713,6 @@ namespace misc {
             CPPUNIT_TEST( test_atomic_unsigned_long)
             CPPUNIT_TEST( test_atomic_long_long)
             CPPUNIT_TEST( test_atomic_unsigned_long_long)
-//#if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION >= 40400
-//            CPPUNIT_TEST( test_atomic_char16_t )
-//            CPPUNIT_TEST( test_atomic_char32_t )
-//#endif
-//            CPPUNIT_TEST( test_atomic_wchar_t)
 
             CPPUNIT_TEST( test_atomic_bool_volatile )
             CPPUNIT_TEST( test_atomic_char_volatile )
@@ -750,11 +726,6 @@ namespace misc {
             CPPUNIT_TEST( test_atomic_unsigned_long_volatile)
             CPPUNIT_TEST( test_atomic_long_long_volatile)
             CPPUNIT_TEST( test_atomic_unsigned_long_long_volatile)
-//#if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION >= 40400
-//            CPPUNIT_TEST( test_atomic_char16_t_volatile )
-//            CPPUNIT_TEST( test_atomic_char32_t_volatile )
-//#endif
-//            CPPUNIT_TEST( test_atomic_wchar_t_volatile)
 
             CPPUNIT_TEST( test_atomic_pointer_void)
             CPPUNIT_TEST( test_atomic_pointer_void_volatile)