Subject: Re: [boost] Array in Unordered Map
From: Daniel James (dnljms_at_[hidden])
Date: 2012-05-01 06:08:50
On 30 April 2012 22:02, Olaf van der Spek <ml_at_[hidden]> wrote:
> On Mon, Apr 30, 2012 at 10:11 PM, Daniel James <dnljms_at_[hidden]> wrote:
>> On 30 April 2012 18:12, Olaf van der Spek <ml_at_[hidden]> wrote:
>>> 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
>> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk