diff options
Diffstat (limited to 'src/boost/libs/container_hash/test/implicit_test.cpp')
-rw-r--r-- | src/boost/libs/container_hash/test/implicit_test.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/boost/libs/container_hash/test/implicit_test.cpp b/src/boost/libs/container_hash/test/implicit_test.cpp new file mode 100644 index 00000000..67859da7 --- /dev/null +++ b/src/boost/libs/container_hash/test/implicit_test.cpp @@ -0,0 +1,21 @@ + +// Copyright 2010 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/container_hash/hash.hpp> + +namespace test +{ + struct base {}; + std::size_t hash_value(base const&) { return 0; } + + struct converts { operator base() const { return base(); } }; +} + +int main() { + boost::hash<test::converts> hash; + test::converts x; + + hash(x); +} |