
On 30 April 2012 22:02, Olaf van der Spek <ml@vdspek.org> wrote:
On Mon, Apr 30, 2012 at 10:11 PM, Daniel James <dnljms@gmail.com> wrote:
On 30 April 2012 18:12, Olaf van der Spek <ml@vdspek.org> wrote:
Hi,
What's the right way to get an array into an unordered map?
This one works on VC10, but GCC appears to look for the hash_value function in namespace std. What's the right way to do this?
As far as I know gcc is correct. Functions are only visible if they're available at the point of the call to hash_value in the source code,
Are both VC10 and VC11 broken then?
Maybe, I'm not expert enough to say for sure. 'broken' is quite a harsh way to describe it. I think Microsoft tends to prioritize supporting existing code over strict standards compliance (which is perhaps one of the reasons they've been so successful in the business world).
or via ADL at the point of instantiation. So you need to do one of: a) write hash_value before including the hash header,
A bit hard, as I need hash_range().
There's a forward declaration in <boost/functional/hash/hash_fwd.hpp> (ah, it's undocumented, I just created a ticket at https://svn.boost.org/trac/boost/ticket/6849).