From: khizmax Date: Tue, 23 Sep 2014 13:39:18 +0000 (+0400) Subject: Remove CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT and emilating code X-Git-Tag: v2.0.0~305 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1011496ab8b1be1a1cf74c61a008682ed359e907;p=libcds.git Remove CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT and emilating code --- diff --git a/cds/compiler/clang/defs.h b/cds/compiler/clang/defs.h index 85b18d12..42c59ed2 100644 --- a/cds/compiler/clang/defs.h +++ b/cds/compiler/clang/defs.h @@ -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 diff --git a/cds/compiler/defs.h b/cds/compiler/defs.h index baa94b61..5ad09b94 100644 --- a/cds/compiler/defs.h +++ b/cds/compiler/defs.h @@ -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 diff --git a/cds/compiler/gcc/defs.h b/cds/compiler/gcc/defs.h index 22f08fd1..8e0952ca 100644 --- a/cds/compiler/gcc/defs.h +++ b/cds/compiler/gcc/defs.h @@ -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 diff --git a/cds/compiler/icl/defs.h b/cds/compiler/icl/defs.h index 29120961..d0683af7 100644 --- a/cds/compiler/icl/defs.h +++ b/cds/compiler/icl/defs.h @@ -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 diff --git a/cds/compiler/vc/defs.h b/cds/compiler/vc/defs.h index 64218429..9450e904 100644 --- a/cds/compiler/vc/defs.h +++ b/cds/compiler/vc/defs.h @@ -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 diff --git a/cds/container/striped_map.h b/cds/container/striped_map.h index 30e987c3..3bc41c8b 100644 --- a/cds/container/striped_map.h +++ b/cds/container/striped_map.h @@ -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() diff --git a/cds/container/striped_set.h b/cds/container/striped_set.h index 83c95758..03b54640 100644 --- a/cds/container/striped_set.h +++ b/cds/container/striped_set.h @@ -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 /** diff --git a/doxygen/cds.doxy b/doxygen/cds.doxy index bea9ed65..882df3a4 100644 --- a/doxygen/cds.doxy +++ b/doxygen/cds.doxy @@ -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 \ diff --git a/tests/test-hdr/map/hdr_striped_map.h b/tests/test-hdr/map/hdr_striped_map.h index 30098f89..2a65fa00 100644 --- a/tests/test-hdr/map/hdr_striped_map.h +++ b/tests/test-hdr/map/hdr_striped_map.h @@ -533,13 +533,6 @@ namespace map { CPPUNIT_MSG( " Duration=" << timer.duration() ); } -#ifndef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT - template - void test_striped2() - { - test_striped(); - } -#else template void test_striped2() { @@ -549,7 +542,6 @@ namespace map { test_striped_with2(m); } -#endif void Striped_hashmap(); void Striped_list(); diff --git a/tests/test-hdr/set/hdr_striped_set.h b/tests/test-hdr/set/hdr_striped_set.h index 5abb5421..70e201a8 100644 --- a/tests/test-hdr/set/hdr_striped_set.h +++ b/tests/test-hdr/set/hdr_striped_set.h @@ -510,15 +510,6 @@ namespace set { # endif } - //******************************************* - // If erase_with && find_with are supported -#ifndef CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT - template - void test_striped2() - { - test_striped(); - } -#else template 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();