Remove CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT and emilating code
authorkhizmax <khizmax@gmail.com>
Tue, 23 Sep 2014 13:39:18 +0000 (17:39 +0400)
committerkhizmax <khizmax@gmail.com>
Tue, 23 Sep 2014 13:39:18 +0000 (17:39 +0400)
cds/compiler/clang/defs.h
cds/compiler/defs.h
cds/compiler/gcc/defs.h
cds/compiler/icl/defs.h
cds/compiler/vc/defs.h
cds/container/striped_map.h
cds/container/striped_set.h
doxygen/cds.doxy
tests/test-hdr/map/hdr_striped_map.h
tests/test-hdr/set/hdr_striped_set.h

index 85b18d1216fc10841202ec3a2f302f909860d5f0..42c59ed2562326053916bbdeebed516f8daff0a2 100644 (file)
@@ -25,9 +25,6 @@
 
 #define alignof __alignof__
 
-// Default template arguments for function templates
-#define CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
-
 // C++11 delete definition ( function declaration = delete)
 #define CDS_CXX11_DELETE_DEFINITION_SUPPORT
 
index baa94b613ac16d95d9ca639192b8a74568dd92bb..5ad09b942a9d73584ac47d49d0e29610f26eb755 100644 (file)
@@ -8,6 +8,7 @@
     - variadic template [CDS_CXX11_VARIADIC_TEMPLATE_SUPPORT]
     - template alias [CDS_CXX11_TEMPLATE_ALIAS_SUPPORT]
     - explicit conversion operator [CDS_CXX11_EXPLICIT_CONVERSION_OPERATOR_SUPPORT]
+    - default template argument for function [CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT]
 */
 
 #if CDS_COMPILER == CDS_COMPILER_MSVC
index 22f08fd1ecabf1abdc3a000abc1fe8669d08c020..8e0952ca0a98836dab0bab593b1e5f28534eb124 100644 (file)
@@ -30,8 +30,6 @@
 #define CDS_RVALUE_SUPPORT
 #define CDS_MOVE_SEMANTICS_SUPPORT
 
-#define CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
-
 // C++11 inline namespace
 #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
 
index 291209613bf9711455c25dcb5c0998e2f5d07ce6..d0683af75cd61aac215e76551f1e9c48612b7c96 100644 (file)
@@ -91,9 +91,6 @@
 #define CDS_RVALUE_SUPPORT
 #define CDS_MOVE_SEMANTICS_SUPPORT
 
-// Default template arguments for function templates (ICL 12.1+)
-#define CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
-
 // C++11 delete definition ( function declaration = delete)
 #define CDS_CXX11_DELETE_DEFINITION_SUPPORT
 
index 642184292683ea542a5f471ab202a6a8db57496b..9450e9041727994b783b4b53a614ba08175fd5d5 100644 (file)
@@ -94,9 +94,6 @@
 #define CDS_RVALUE_SUPPORT
 #define CDS_MOVE_SEMANTICS_SUPPORT
 
-// Default template arguments for function templates (VC12+)
-#define CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
-
 // C++11 delete definition ( function declaration = delete)
 #define CDS_CXX11_DELETE_DEFINITION_SUPPORT
 
index 30e987c3d8f1aaa3269572ae2f4e4567612884f3..3bc41c8b3df1f55142e4b460d1b2cf59f6711a1b 100644 (file)
@@ -788,7 +788,6 @@ namespace cds { namespace container {
             return base_class::erase( key );
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Deletes the item from the map using \p pred predicate for searching
         /**
             The function is an analog of \ref cds_nonintrusive_StripedMap_erase "erase(K const&)"
@@ -810,7 +809,6 @@ namespace cds { namespace container {
             return erase_with( key, pred, typename base_class::empty_erase_functor() );
 #       endif
         }
-#endif
 
         /// Delete \p key from the map
         /** \anchor cds_nonintrusive_StripedMap_erase_func
@@ -836,7 +834,6 @@ namespace cds { namespace container {
             return base_class::erase( key, f );
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Deletes the item from the map using \p pred predicate for searching
         /**
             The function is an analog of \ref cds_nonintrusive_StripedMap_erase_func "erase(K const&, Func)"
@@ -854,7 +851,6 @@ namespace cds { namespace container {
         {
             return base_class::erase_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >(), f );
         }
-#endif
 
         /// Find the key \p key
         /** \anchor cds_nonintrusive_StripedMap_find_func
@@ -885,7 +881,6 @@ namespace cds { namespace container {
 #       endif
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Find the key \p val using \p pred predicate
         /**
             The function is an analog of \ref cds_nonintrusive_StripedMap_find_func "find(K const&, Func)"
@@ -909,7 +904,6 @@ namespace cds { namespace container {
             return base_class::find_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >(), cds::ref(fw) );
 #       endif
         }
-#endif
 
         /// Find the key \p key
         /** \anchor cds_nonintrusive_StripedMap_find_val
@@ -923,7 +917,6 @@ namespace cds { namespace container {
             return base_class::find( key );
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Find the key \p val using \p pred predicate
         /**
             The function is an analog of \ref cds_nonintrusive_StripedMap_find_val "find(K const&)"
@@ -941,7 +934,6 @@ namespace cds { namespace container {
         {
             return base_class::find_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >() );
         }
-#endif
 
         /// Clears the map
         void clear()
index 83c95758e049f90dc7e6aa4b13c32c702f5d50c5..03b5464060cec83f07ac5747f8143227e48b6d62 100644 (file)
@@ -732,7 +732,6 @@ namespace cds { namespace container {
 #       endif
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Deletes the item from the set using \p pred predicate for searching
         /**
             The function is an analog of \ref cds_nonintrusive_StripedSet_erase "erase(Q const&)"
@@ -754,7 +753,6 @@ namespace cds { namespace container {
             return erase_with( key, pred, empty_erase_functor() );
 #       endif
         }
-#endif
 
         /// Delete \p key from the set
         /** \anchor cds_nonintrusive_StripedSet_erase_func
@@ -789,7 +787,6 @@ namespace cds { namespace container {
             return bOk;
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Deletes the item from the set using \p pred predicate for searching
         /**
             The function is an analog of \ref cds_nonintrusive_StripedSet_erase_func "erase(Q const&, Func)"
@@ -818,7 +815,6 @@ namespace cds { namespace container {
                 --base_class::m_ItemCounter;
             return bOk;
         }
-#endif
 
         /// Find the key \p val
         /** \anchor cds_nonintrusive_StripedSet_find_func
@@ -849,7 +845,6 @@ namespace cds { namespace container {
             return base_class::find( val, f );
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Find the key \p val using \p pred predicate
         /**
             The function is an analog of \ref cds_nonintrusive_StripedSet_find_func "find(Q&, Func)"
@@ -867,7 +862,6 @@ namespace cds { namespace container {
         {
             return base_class::find_with( val, pred, f );
         }
-#endif
 
         /// Find the key \p val
         /** \anchor cds_nonintrusive_StripedSet_find_cfunc
@@ -896,7 +890,6 @@ namespace cds { namespace container {
             return base_class::find( val, f );
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Find the key \p val using \p pred predicate
         /**
             The function is an analog of \ref cds_nonintrusive_StripedSet_find_cfunc "find(Q const&, Func)"
@@ -914,7 +907,6 @@ namespace cds { namespace container {
         {
             return base_class::find_with( val, pred, f );
         }
-#endif
 
         /// Find the key \p val
         /** \anchor cds_nonintrusive_StripedSet_find_val
@@ -931,7 +923,6 @@ namespace cds { namespace container {
             return base_class::find( val );
         }
 
-#ifdef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
         /// Find the key \p val using \p pred predicate
         /**
             The function is an analog of \ref cds_nonintrusive_StripedSet_find_val "find(Q const&)"
@@ -949,7 +940,6 @@ namespace cds { namespace container {
         {
             return base_class::find_with( val, pred );
         }
-#endif
 
         /// Clears the set
         /**
index bea9ed65ca8f94380c7e1c202e57049eae3b6e3d..882df3a4f370b65873916400ef48f7fce5d65e75 100644 (file)
@@ -1396,14 +1396,10 @@ PREDEFINED             = CDS_BUILD_BITS=32 \
                          CDS_DOXYGEN_INVOKED \
                          cds_std=std \
                          CDS_URCU_SIGNAL_HANDLING_ENABLED \
-                         CDS_CXX11_VARIADIC_TEMPLATE_SUPPORT \
-                         CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT \
                          CDS_CXX11_DELETE_DEFINITION_SUPPORT \
                          CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT \
                          CDS_CXX11_INLINE_NAMESPACE_SUPPORT \
                          CDS_CXX11_INLINE_NAMESPACE=inline \
-                         CDS_CXX11_TEMPLATE_ALIAS_SUPPORT \
-                         CDS_CXX11_EXPLICIT_CONVERSION_OPERATOR_SUPPORT \
                          CDS_CXX11_DECLTYPE_SUPPORT \
                          CDS_RVALUE_SUPPORT \
                          CDS_MOVE_SEMANTICS_SUPPORT \
index 30098f8970e735812a2748e7b43fe565b0c8503c..2a65fa004f336cc811836e700d1624fe70b77168 100644 (file)
@@ -533,13 +533,6 @@ namespace map {
             CPPUNIT_MSG( "   Duration=" << timer.duration() );
         }
 
-#ifndef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
-        template <class Map>
-        void test_striped2()
-        {
-            test_striped<Map>();
-        }
-#else
         template <class Map>
         void test_striped2()
         {
@@ -549,7 +542,6 @@ namespace map {
 
             test_striped_with2(m);
         }
-#endif
 
         void Striped_hashmap();
         void Striped_list();
index 5abb542121d28abb036c7c3418bc2b3e52318974..70e201a83cabdc9beb3ab5858b6c106685d5987a 100644 (file)
@@ -510,15 +510,6 @@ namespace set {
 #       endif
         }
 
-        //*******************************************
-        // If erase_with && find_with are supported
-#ifndef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
-        template <class Set>
-        void test_striped2()
-        {
-            test_striped<Set>();
-        }
-#else
         template <class Set>
         void test_striped2()
         {
@@ -712,7 +703,6 @@ namespace set {
             CPPUNIT_ASSERT( check_size( s, 0 ));
 #       endif
         }
-#endif // CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
 
         void Striped_list();
         void Striped_vector();