// (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to 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) #ifdef TEST_STD_HEADERS #include #else #include #endif #include #include #include #include #include "verify_return.hpp" template void check_hash(T t) { typedef std::tr1::hash hash_type; typedef typename hash_type::argument_type arg_type; typedef typename hash_type::result_type result_type; BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_base_of, hash_type>::value)); hash_type h; const hash_type& ch = h; verify_return_type(ch(t), std::size_t(0)); } class UDT; int main() { check_hash(0); check_hash(0u); check_hash(0L); check_hash(0uL); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(std::string("")); check_hash(std::wstring(L"")); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); check_hash(static_cast(0)); return 0; }