[LLVMbugs] [Bug 9963] hash in memory and functional collides

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 20 07:55:08 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9963

Howard Hinnant <hhinnant at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Howard Hinnant <hhinnant at apple.com> 2011-05-20 09:55:08 CDT ---
The attached code isn't conforming, and I'm not seeing a motivation to support
it as an extension.  Here is the conforming way to specialize std::hash:

namespace std {
  template<>
  struct hash<operand::datatype>
  {
    std::size_t operator()(operand::datatype t) const
    {
       return (size_t)t;
    }
  };
}

Reference:  [unord.hash]/p1.  There is no definition of the primary template
hash.

Resolving as "not a bug".

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list