Guest User

Untitled

a guest
May 23rd, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #include <boost/utility/string_view.hpp>
  3. #include <boost/functional/hash.hpp>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. std::string str = "jeffin";
  10. boost::string_view ref = str;
  11. if(boost::hash_value(ref) == boost::hash_value(str))
  12. std::cout<<"sucess"<<std::endl;
  13. boost::hash<std::string> hstr;
  14. boost::hash<boost::string_view> hsv;
  15. if(hsv(ref) == hstr(str))
  16. cout<<"does it really works";
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment