Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <boost/utility/string_view.hpp>
- #include <boost/functional/hash.hpp>
- using namespace std;
- int main()
- {
- std::string str = "jeffin";
- boost::string_view ref = str;
- if(boost::hash_value(ref) == boost::hash_value(str))
- std::cout<<"sucess"<<std::endl;
- boost::hash<std::string> hstr;
- boost::hash<boost::string_view> hsv;
- if(hsv(ref) == hstr(str))
- cout<<"does it really works";
- return 0;
- }
Add Comment
Please, Sign In to add comment