From: khizmax Date: Wed, 3 Aug 2016 09:58:37 +0000 (+0300) Subject: Removed redundant checking X-Git-Tag: v2.2.0~155 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=commitdiff_plain;h=ff0a61a3efd6bf63d5ed812c2dd5c0447b093bb4 Removed redundant checking --- 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 ); }