Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct MyHashCompare example in concurrent_hash_map page #1339

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading