Ticket #952: hash-warning.patch

File hash-warning.patch, 1.9 KB (added by Daniel James, 15 years ago)

Patch that hopefully fixes this.

  • hash.hpp

    RCS file: /cvsroot/boost/boost/boost/functional/hash/hash.hpp,v
    retrieving revision 1.27.2.7
    diff -u -r1.27.2.7 hash.hpp
     
    11
    2 //  Copyright Daniel James 2005-2006. Use, modification, and distribution are
     2//  Copyright Daniel James 2005-2007. Use, modification, and distribution are
    33//  subject to the Boost Software License, Version 1.0. (See accompanying
    44//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    55
     
    2828#include <boost/type_traits/is_const.hpp>
    2929#endif
    3030
     31#if defined(BOOST_MSVC)
     32#   pragma warning(push)
     33#   pragma warning(disable:4267)
     34#endif
     35
    3136namespace boost
    3237{
    3338#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
     
    4146    std::size_t hash_value(long);
    4247    std::size_t hash_value(unsigned long);
    4348
    44 #if defined(BOOST_MSVC) && defined(_WIN64)
     49#if BOOST_HAS_LONG_LONG && defined(_M_X64) && defined(_WIN64)
    4550    // On 64-bit windows std::size_t is a typedef for unsigned long long, which
    4651    // isn't due to be supported until Boost 1.35. So add support here.
    4752    // (Technically, Boost.Hash isn't actually documented as supporting
    4853    // std::size_t. But it would be pretty silly not to).
    49     std::size_t hash_value(std::size_t);
     54    std::size_t hash_value(long long);
     55    std::size_t hash_value(unsigned long long);
    5056#endif
    5157
    5258#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
     
    116122        return static_cast<std::size_t>(v);
    117123    }
    118124
    119 #if defined(_M_X64) && defined(_WIN64)
     125#if BOOST_HAS_LONG_LONG && defined(_M_X64) && defined(_WIN64)
    120126    inline std::size_t hash_value(long long v)
    121127    {
    122128        return v;
     
    588594#endif  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
    589595}
    590596
     597#if defined(BOOST_MSVC)
     598#   pragma warning(pop)
     599#endif
     600
    591601#endif
    592602