implicit_test.cpp 487 B

123456789101112131415161718192021
  1. // Copyright 2010 Daniel James.
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #include <boost/container_hash/hash.hpp>
  5. namespace test
  6. {
  7. struct base {};
  8. std::size_t hash_value(base const&) { return 0; }
  9. struct converts { operator base() const { return base(); } };
  10. }
  11. int main() {
  12. boost::hash<test::converts> hash;
  13. test::converts x;
  14. hash(x);
  15. }