Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. #include <string>
  2. #include <unordered_set>
  3. #include <utility>
  4. #include<boost/unordered_map.hpp>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. boost::unordered_map< unordered_set<string>, int> training_groups;
  11. pair<unordered_set<string>, int> a_training_group;
  12. training_groups.insert(a_training_group);
  13. return 0;
  14. }
  15.  
  16. 1>C:Program Files (x86)Microsoft Visual Studio 12.0VCincludexhash(30): error C2440: 'type cast' : cannot convert from 'const std::unordered_set<std::string,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<_Kty>>' to 'size_t'
  17. 1> with
  18. 1> [
  19. 1> _Kty=std::string
  20. 1> ]
  21. 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
  22. 1> C:Program Filesboostboost_1_59_0boost/functional/hash/extensions.hpp(262) : see reference to function template instantiation 'size_t stdext::hash_value<T>(const _Kty &)' being compiled
  23. 1> with
  24. 1> [
  25. 1> T=std::unordered_set<std::string,std::hash<std::string>,std::equal_to<std::string>,std::allocator<std::string>>
  26. 1> , _Kty=std::unordered_set<std::string,std::hash<std::string>,std::equal_to<std::string>,std::allocator<std::string>>
  27. 1> ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement