Boost logo

Boost Users :

Subject: Re: [Boost-users] Puzzled: compiler can't find a match for function call
From: David Walthall (walthall_at_[hidden])
Date: 2008-09-12 11:37:07


Zeljko Vrba wrote:
> On Thu, Sep 11, 2008 at 07:53:26AM -0700, Steven Watanabe wrote:
>> AMDG
>>
>> Zeljko Vrba wrote:
>>> template<typename K>
>>> inline typename id_t<K>::type&
>>> inc2(typename id_t<K>::type &id
>> The compiler cannot deduce K.
>> If you call inc2<KEY>(m) it should work.
>>
> Indeed it works. Could you please explain why the compiler can deduce
> K in BF::map<BF::pair<K, int> > , but not in typename id_t<K>::type?

This thread has a good explanation:
http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/42a90c16154328ad

David


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net