Merge iostreams, hash.

Including disallowing implicit casts to `hash_value`.


[SVN r63812]
This commit is contained in:
Daniel James
2010-07-10 14:20:45 +00:00
parent 3cec009503
commit 6f13510580
5 changed files with 60 additions and 0 deletions
+13
View File
@@ -15,6 +15,7 @@
#include <boost/functional/hash/detail/hash_float.hpp>
#include <string>
#include <boost/limits.hpp>
#include <boost/static_assert.hpp>
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#include <boost/type_traits/is_pointer.hpp>
@@ -29,6 +30,18 @@
namespace boost
{
#if !defined(BOOST_HASH_ALLOW_IMPLICIT_CASTS)
// If you get a static assertion here, it's because hash_value
// isn't declared for your type.
template <typename T>
std::size_t hash_value(T const&) {
BOOST_STATIC_ASSERT((T*) 0 && false);
return 0;
}
#endif
std::size_t hash_value(bool);
std::size_t hash_value(char);
std::size_t hash_value(unsigned char);