Fixed explicit ctor incompatibility
[libcds.git] / cds / container / striped_set / adapter.h
index bbb1be14652a9ad396f4479dd409c21c471cd119..3f0df6428069bb7f251eb6b67225992fa1cdecd1 100644 (file)
@@ -452,7 +452,7 @@ namespace cds { namespace container {
                 template <typename Q, typename Func>
                 bool insert( const Q& key, Func f )
                 {
-                    std::pair<iterator, bool> res = m_Map.insert( value_type( key, mapped_type() ) );
+                    std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ) );
                     if ( res.second )
                         f( *res.first );
                     return res.second;
@@ -461,7 +461,7 @@ namespace cds { namespace container {
                 template <typename Q, typename... Args>
                 bool emplace( Q&& key, Args&&... args )
                 {
-                    std::pair<iterator, bool> res = m_Map.emplace( std::forward<Q>(key), std::move( mapped_type( std::forward<Args>(args)...)));
+                    std::pair<iterator, bool> res = m_Map.emplace( key_type( std::forward<Q>( key )), mapped_type( std::forward<Args>( args )...));
                     return res.second;
                 }
 
@@ -469,12 +469,12 @@ namespace cds { namespace container {
                 std::pair<bool, bool> update( const Q& key, Func func, bool bAllowInsert )
                 {
                     if ( bAllowInsert ) {
-                        std::pair<iterator, bool> res = m_Map.insert( value_type( key, mapped_type() ));
+                        std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ));
                         func( res.second, *res.first );
                         return std::make_pair( true, res.second );
                     }
                     else {
-                        auto it = m_Map.find(key_type( key ));
+                        auto it = m_Map.find( key_type( key ));
                         if ( it == end() )
                             return std::make_pair( false, false );
                         func( false, *it );
@@ -485,7 +485,7 @@ namespace cds { namespace container {
                 template <typename Q, typename Func>
                 bool erase( const Q& key, Func f )
                 {
-                    iterator it = m_Map.find( key_type(key) );
+                    iterator it = m_Map.find( key_type( key ));
                     if ( it == m_Map.end() )
                         return false;
                     f( *it );
@@ -496,7 +496,7 @@ namespace cds { namespace container {
                 template <typename Q, typename Func>
                 bool find( Q& val, Func f )
                 {
-                    iterator it = m_Map.find( key_type(val) );
+                    iterator it = m_Map.find( key_type( val ));
                     if ( it == m_Map.end() )
                         return false;
                     f( *it, val );