Skip to content

Commit

Permalink
Correct MyHashCompare example in concurrent_hash_map page (uxlfound…
Browse files Browse the repository at this point in the history
…ation#1339)

Signed off by: Daniel Bashir <[email protected]>
  • Loading branch information
db7894 authored Apr 18, 2024
1 parent 4a87ca1 commit 5155e9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/main/tbb_userguide/concurrent_hash_map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ string occurs in the array ``Data``.

// Structure that defines hashing and comparison operations for user's type.
struct MyHashCompare {
static size_t hash( const string& x ) {
size_t hash( const string& x ) const {
size_t h = 0;
for( const char* s = x.c_str(); *s; ++s )
h = (h*17)^*s;
return h;
}
//! True if strings are equal
static bool equal( const string& x, const string& y ) {
bool equal( const string& x, const string& y ) const {
return x==y;
}
};
Expand Down Expand Up @@ -128,4 +128,4 @@ any other extant accesses on ``key``.
.. toctree::
:maxdepth: 4

../tbb_userguide/More_on_HashCompare
../tbb_userguide/More_on_HashCompare

0 comments on commit 5155e9f

Please sign in to comment.