We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
std::hash<std::string_view> on cppreference
Section 24.4.5 in C++ 17 working draft N4659: Hash support:
Note: The hash value of a string view object is equal to the hash value of the corresponding string object.
Currently the following tests fail and although it's not std::string_view, you might consider this for core::string_view.
std::
string_view
core::string_view
SECTION("hash-std::string") { CHECK( std::hash<core::string_view>()("hello") == std::hash<std::string>()("hello") ); CHECK( std::hash<core::string_view>()("world") == std::hash<std::string>()("world") ); }
prompt> test-string-view.exe --reporter compact string-view.cpp:383: failed: std::hash<core::string_view>()("hello") == std::hash<std::string>()("hello") for: 2191231550387646743 == 2762169579135187400 string-view.cpp:384: failed: std::hash<core::string_view>()("world") == std::hash<std::string>()("world") for: 5568329560871645431 == 8751027807033337960 Failed 1 test case, failed 2 assertions.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
std::hash<std::string_view> on cppreference
Section 24.4.5 in C++ 17 working draft N4659: Hash support:
Currently the following tests fail and although it's not
std::
string_view
, you might consider this forcore::string_view
.The text was updated successfully, but these errors were encountered: