From ff0a61a3efd6bf63d5ed812c2dd5c0447b093bb4 Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 3 Aug 2016 12:58:37 +0300 Subject: [PATCH] Removed redundant checking --- cds/container/impl/iterable_kvlist.h | 30 +++------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/cds/container/impl/iterable_kvlist.h b/cds/container/impl/iterable_kvlist.h index 2826d2e1..d3b2de37 100644 --- a/cds/container/impl/iterable_kvlist.h +++ b/cds/container/impl/iterable_kvlist.h @@ -249,15 +249,7 @@ namespace cds { namespace container { @note The function is supported only if \ref mapped_type is default constructible */ template -#ifdef CDS_DOXYGEN_INVOKED - bool -#else - typename std::enable_if< - std::is_same::value && std::is_default_constructible< mapped_type >::value, - bool - >::type -#endif - insert( K const& key ) + bool insert( K const& key ) { return base_class::emplace( key, mapped_type()); } @@ -309,15 +301,7 @@ namespace cds { namespace container { @note The function is supported only if \ref mapped_type is default constructible */ template -#ifdef CDS_DOXYGEN_INVOKED - bool -#else - typename std::enable_if< - std::is_same::value && std::is_default_constructible< mapped_type >::value, - bool - >::type -#endif - insert_with( K const& key, Func func ) + bool insert_with( K const& key, Func func ) { return base_class::insert( value_type( key, mapped_type()), func ); } @@ -351,15 +335,7 @@ namespace cds { namespace container { @note The function is supported only if \ref mapped_type is default constructible */ template -#ifdef CDS_DOXYGEN_INVOKED - std::pair -#else - typename std::enable_if< - std::is_same::value && std::is_default_constructible< mapped_type >::value, - std::pair - >::type -#endif - update( K const& key, Func f, bool bAllowInsert = true ) + std::pair update( K const& key, Func f, bool bAllowInsert = true ) { return base_class::update( value_type( key, mapped_type()), f, bAllowInsert ); } -- 2.34.1