Fixed doc typo
[libcds.git] / cds / container / striped_set / adapter.h
index bbb1be14652a9ad396f4479dd409c21c471cd119..3a6bc81d886e7a60e5000d738d66b725484e589e 100644 (file)
@@ -128,7 +128,7 @@ namespace cds { namespace container {
                 The type \p Q can differ from \ref value_type of items storing in the container.
                 Therefore, the \p value_type should be comparable with type \p Q and constructible from type \p Q,
 
-                Returns <tt> std::pair<bool, bool> </tt> where \p first is true if operation is successfull,
+                Returns <tt> std::pair<bool, bool> </tt> where \p first is true if operation is successful,
                 \p second is true if new item has been added or \p false if the item with \p val key
                 already exists.
                 <hr>
@@ -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 );