fork download
  1. #include <vector>
  2. #include <boost/unordered_map.hpp>
  3.  
  4. template <typename Container>
  5. struct container_hash {
  6. std::size_t operator()(Container const& c) const {
  7. return boost::hash_range(c.begin(), c.end());
  8. }
  9. };
  10.  
  11. int main()
  12. {
  13. boost::unordered_map <std::vector <int>, int, container_hash <std::vector <int> > > foo;
  14. return 0;
  15. }
  16.  
  17.  
Success #stdin #stdout 0s 3136KB
stdin
Standard input is empty
stdout
Standard output is empty