
On 24 February 2011 22:25, Peter Dimov <pdimov@pdimov.com> wrote:
But why is there a definition of hash_value( bool ) when this macro isn't defined? Shouldn't the largest integral types be enough? Even if they aren't, everything below int shouldn't be necessary - it's a standard promotion and it shouldn't be ambiguous to omit bool/char/short.
It looks like it was required for Borland.
From http://article.gmane.org/gmane.comp.lib.boost.devel/119513/
2. It is said in hash.cpp that BCB has problems with the overload of hash_value for bool. This should be fixed in one way or another (possibly by not defining it for this compiler, I guess.)
It actually says that BCB has problems without it. There was an overload ambiguity error for boost::hash<bool> (although, calling boost::hash<bool> would be a very odd thing to do) and that was added to work around it.
Daniel