From 7526efdaf2dd680d672ea1c21c172dd180c366d1 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sun, 28 Sep 2014 23:41:46 +0400 Subject: [PATCH] Fix bugs of last commit --- cds/container/striped_map/std_hash_map_std.h | 6 +++--- cds/container/striped_map/std_hash_map_vc.h | 8 ++++---- cds/container/striped_map/std_map.h | 2 +- cds/container/striped_set/std_hash_set_std.h | 2 +- cds/container/striped_set/std_hash_set_vc.h | 8 ++++---- cds/container/striped_set/std_set.h | 8 ++++---- cds/details/functor_wrapper.h | 6 +++--- projects/Win/vc12/cds.vcxproj | 1 - projects/Win/vc12/cds.vcxproj.filters | 3 --- 9 files changed, 20 insertions(+), 24 deletions(-) diff --git a/cds/container/striped_map/std_hash_map_std.h b/cds/container/striped_map/std_hash_map_std.h index 8738c912..30b12d0a 100644 --- a/cds/container/striped_map/std_hash_map_std.h +++ b/cds/container/striped_map/std_hash_map_std.h @@ -110,7 +110,7 @@ namespace cds { namespace intrusive { namespace striped_set { { std::pair res = m_Map.insert( value_type( key, mapped_type() )); if ( res.second ) - ::f( const_cast(*res.first) ); + f( const_cast(*res.first) ); return res.second; } @@ -135,7 +135,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Map.find( key_type(key) ); if ( it == m_Map.end() ) return false; - ::f( const_cast(*it) ); + f( const_cast(*it) ); m_Map.erase( it ); return true; } @@ -146,7 +146,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Map.find( key_type(val) ); if ( it == m_Map.end() ) return false; - ::f( const_cast(*it), val ); + f( const_cast(*it), val ); return true; } diff --git a/cds/container/striped_map/std_hash_map_vc.h b/cds/container/striped_map/std_hash_map_vc.h index 81360899..902fbd1a 100644 --- a/cds/container/striped_map/std_hash_map_vc.h +++ b/cds/container/striped_map/std_hash_map_vc.h @@ -111,7 +111,7 @@ namespace cds { namespace intrusive { namespace striped_set { { std::pair res = m_Map.insert( value_type( key, mapped_type() ) ); if ( res.second ) - ::f( *res.first ); + f( *res.first ); return res.second; } @@ -119,7 +119,7 @@ namespace cds { namespace intrusive { namespace striped_set { std::pair ensure( const Q& val, Func func ) { std::pair res = m_Map.insert( value_type( val, mapped_type() )); - ::func( res.second, *res.first ); + func( res.second, *res.first ); return std::make_pair( true, res.second ); } @@ -129,7 +129,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Map.find( key_type(key) ); if ( it == m_Map.end() ) return false; - ::f( *it ); + f( *it ); m_Map.erase( it ); return true; } @@ -140,7 +140,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Map.find( key_type(val) ); if ( it == m_Map.end() ) return false; - ::f( *it, val ); + f( *it, val ); return true; } diff --git a/cds/container/striped_map/std_map.h b/cds/container/striped_map/std_map.h index 6214b588..5b67b090 100644 --- a/cds/container/striped_map/std_map.h +++ b/cds/container/striped_map/std_map.h @@ -106,7 +106,7 @@ namespace cds { namespace intrusive { namespace striped_set { { std::pair res = m_Map.insert( value_type( key, mapped_type() ) ); if ( res.second ) - ::f( *res.first ); + f( *res.first ); return res.second; } diff --git a/cds/container/striped_set/std_hash_set_std.h b/cds/container/striped_set/std_hash_set_std.h index 72cb3fc1..66a11ad5 100644 --- a/cds/container/striped_set/std_hash_set_std.h +++ b/cds/container/striped_set/std_hash_set_std.h @@ -93,7 +93,7 @@ namespace cds { namespace intrusive { namespace striped_set { { std::pair res = m_Set.insert( value_type(val) ); if ( res.second ) - ::f( const_cast(*res.first) ); + f( const_cast(*res.first) ); return res.second; } diff --git a/cds/container/striped_set/std_hash_set_vc.h b/cds/container/striped_set/std_hash_set_vc.h index 765a0698..b1ffb60b 100644 --- a/cds/container/striped_set/std_hash_set_vc.h +++ b/cds/container/striped_set/std_hash_set_vc.h @@ -95,7 +95,7 @@ namespace cds { namespace intrusive { namespace striped_set { { std::pair res = m_Set.insert( value_type(val) ); if ( res.second ) - ::f( *res.first ); + f( *res.first ); return res.second; } @@ -103,7 +103,7 @@ namespace cds { namespace intrusive { namespace striped_set { std::pair ensure( const Q& val, Func func ) { std::pair res = m_Set.insert( value_type(val) ); - ::func( res.second, *res.first, val ); + func( res.second, *res.first, val ); return std::make_pair( true, res.second ); } @@ -113,7 +113,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Set.find( value_type(key) ); if ( it == m_Set.end() ) return false; - ::f( *it ); + f( *it ); m_Set.erase( it ); return true; } @@ -124,7 +124,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Set.find( value_type(val) ); if ( it == m_Set.end() ) return false; - ::f( *it, val ); + f( *it, val ); return true; } diff --git a/cds/container/striped_set/std_set.h b/cds/container/striped_set/std_set.h index b64c5cdc..4e579091 100644 --- a/cds/container/striped_set/std_set.h +++ b/cds/container/striped_set/std_set.h @@ -90,7 +90,7 @@ namespace cds { namespace intrusive { namespace striped_set { { std::pair res = m_Set.insert( value_type(val) ); if ( res.second ) - ::f( const_cast(*res.first) ); + f( const_cast(*res.first) ); return res.second; } @@ -105,7 +105,7 @@ namespace cds { namespace intrusive { namespace striped_set { std::pair ensure( const Q& val, Func func ) { std::pair res = m_Set.insert( value_type(val) ); - ::func( res.second, const_cast(*res.first), val ); + func( res.second, const_cast(*res.first), val ); return std::make_pair( true, res.second ); } @@ -115,7 +115,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Set.find( value_type(key) ); if ( it == m_Set.end() ) return false; - ::f( const_cast(*it) ); + f( const_cast(*it) ); m_Set.erase( it ); return true; } @@ -126,7 +126,7 @@ namespace cds { namespace intrusive { namespace striped_set { iterator it = m_Set.find( value_type(val) ); if ( it == m_Set.end() ) return false; - ::f( const_cast(*it), val ); + f( const_cast(*it), val ); return true; } diff --git a/cds/details/functor_wrapper.h b/cds/details/functor_wrapper.h index 3ee34fcc..cb166d31 100644 --- a/cds/details/functor_wrapper.h +++ b/cds/details/functor_wrapper.h @@ -40,11 +40,11 @@ namespace cds { namespace details { }; template - struct functor_wrapper< boost::reference_wrapper > + struct functor_wrapper< std::reference_wrapper > { - boost::reference_wrapper m_func; + std::reference_wrapper m_func; public: - functor_wrapper( boost::reference_wrapper f) + functor_wrapper( std::reference_wrapper f) : m_func(f) {} diff --git a/projects/Win/vc12/cds.vcxproj b/projects/Win/vc12/cds.vcxproj index 9a5ab508..471ae9ea 100644 --- a/projects/Win/vc12/cds.vcxproj +++ b/projects/Win/vc12/cds.vcxproj @@ -818,7 +818,6 @@ - diff --git a/projects/Win/vc12/cds.vcxproj.filters b/projects/Win/vc12/cds.vcxproj.filters index 88b2f14d..358e40ba 100644 --- a/projects/Win/vc12/cds.vcxproj.filters +++ b/projects/Win/vc12/cds.vcxproj.filters @@ -200,9 +200,6 @@ Header Files\cds - - Header Files\cds - Header Files\cds -- 2.34.1