This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

hash_map problem


Hi,
I have a problem using the hash_map class. Basically I can use it as a
inherited class, I can use its constructor and initialize it. Nevertheless
when I try using the "find" function or "insert" function (even maybe other
ones...) I get an compilation error that is given below. I have made my self
hash function containing the operator() : 
class hashInstanz
{
	public:
		unsigned int operator() (const instanz_t& key) const;
};
Can anybody please help me to deal with that? I will be graceful with any
help :) 

In member function `size_t 
   std::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, 
   _Alloc>::_M_bkt_num_key(const _Key&, unsigned int) const [with _Val = 
   std::pair<instanz_t* const, BuGeschaeftsvorfall*>, _Key = instanz_t*, 
   _HashFcn = hashInstanz, _ExtractKey =
std::_Select1st<std::pair<instanz_t* 
   const, BuGeschaeftsvorfall*> >, _EqualKey = std::equal_to<instanz_t*>, 
   _Alloc = std::allocator<BuGeschaeftsvorfall*>]':
/usr/local/include/g++-v3/ext/stl_hashtable.h:497:   instantiated from
`size_t std::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey,
_Alloc>::_M_bkt_num_key(const _Key&) const [with _Val = std::pair<instanz_t*
const, BuGeschaeftsvorfall*>, _Key = instanz_t*, _HashFcn = hashInstanz,
_ExtractKey = std::_Select1st<std::pair<instanz_t* const,
BuGeschaeftsvorfall*> >, _EqualKey = std::equal_to<instanz_t*>, _Alloc =
std::allocator<BuGeschaeftsvorfall*>]'
/usr/local/include/g++-v3/ext/stl_hashtable.h:447:   instantiated from
`std::_Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
_EqualKey, _Alloc> std::hashtable<_Val, _Key, _HashFcn, _ExtractKey,
_EqualKey, _Alloc>::find(const _Key&) const [with _Val =
std::pair<instanz_t* const, BuGeschaeftsvorfall*>, _Key = instanz_t*,
_HashFcn = hashInstanz, _ExtractKey = std::_Select1st<std::pair<instanz_t*
const, BuGeschaeftsvorfall*> >, _EqualKey = std::equal_to<instanz_t*>,
_Alloc = std::allocator<BuGeschaeftsvorfall*>]'
/usr/local/include/g++-v3/ext/hash_map:170:   instantiated from `typename
std::hashtable<std::pair<const _Key, _Tp>, _Key, _HashFcn,
std::_Select1st<std::pair<const _Key, _Tp> >, _EqualKey,
_Alloc>::const_iterator std::hash_map<_Key, _Tp, _HashFcn, _EqualKey,
_Alloc>::find(typename std::hashtable<std::pair<const _Key, _Tp>, _Key,
_HashFcn, std::_Select1st<std::pair<const _Key, _Tp> >, _EqualKey,
_Alloc>::key_type&) const [with _Key = instanz_t*, _Tp =
BuGeschaeftsvorfall*, _HashFcn = hashInstanz, _EqualKey =
std::equal_to<instanz_t*>, _Alloc = std::allocator<BuGeschaeftsvorfall*>]'
/export/home/ata/projects/belegprozessor/vvevbu/ux1/cpr/src/bugescha.cc:319:
instantiated from here
/usr/local/include/g++-v3/ext/stl_hashtable.h:507: no match for call to
`(const 
   hashInstanz) (instanz_t* const&)'
/export/home/ata/projects/belegprozessor/vvevbu/ux1/cpr/src/bugescha.cc:335:
candidates
   are: unsigned int hashInstanz::operator()(const instanz_t&) const



__________________________________________________
 <<...OLE_Obj...>> 
Software Beratungs-Institut AG
Arnes Tabakovic
Business Consultant
Christoph Merian-Ring 29
CH - 4153 Reinach/Basel

Telefon:                   +41 (0)61 717 36 54
Fax:                         +41 (0)61 717 36 10
Homepage:              www.sbi.ch
E-Mail:                      arnes.tabakovic@sbi.ch
__________________________________________________


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]