This project is read-only.
1

Closed

hashtable.h build error

description

Building on iOS, I get the following rather lengthy error:
 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/include/c++/4.2.1/tr1/hashtable:1135: error: passing 'const std::tr1::hashtable
<short unsigned int,
std::pair<const short unsigned int, pstsdk::disk::column_description>,
std::allocator<std::pair<const short unsigned int, pstsdk::disk::column_description> >,
Internal::extract1st<std::pair<const short unsigned int, pstsdk::disk::column_description> >,
std::equal_to<short unsigned int>,
std::tr1::hash<short unsigned int>,
Internal::mod_range_hashing,
Internal::default_ranged_hash,
Internal::prime_rehash_policy,
false,
true,
true>'
as 'this' argument of 'typename std::tr1::hashtable<Key, Value, Allocator, ExtractKey, Equal, H1, H2, H, RehashPolicy, cache_hash_code, mutable_iterators, unique_keys>::node* std::tr1::hashtable<Key, Value, Allocator, ExtractKey, Equal, H1, H2, H, RehashPolicy, cache_hash_code, mutable_iterators, unique_keys>::find_node(Internal::hash_node<Value, cache_hash_code>*, const Key&, typename std::tr1::hashtable<Key, Value, Allocator, ExtractKey, Equal, H1, H2, H, RehashPolicy, cache_hash_code, mutable_iterators, unique_keys>::hash_code_t)
[with
Key = short unsigned int,
Value = std::pair<const short unsigned int, pstsdk::disk::column_description>,
Allocator = std::allocator<std::pair<const short unsigned int, pstsdk::disk::column_description> >,
ExtractKey = Internal::extract1st<std::pair<const short unsigned int, pstsdk::disk::column_description> >,
Equal = std::equal_to<short unsigned int>,
H1 = std::tr1::hash<short unsigned int>,
H2 = Internal::mod_range_hashing,
H = Internal::default_ranged_hash,
RehashPolicy = Internal::prime_rehash_policy,
bool cache_hash_code = false,
bool mutable_iterators = true,
bool unique_keys = true]'
discards qualifiers
 
The error originates from this line in the template<typename T> inline pstsdk::ulonglong pstsdk::basic_table<T>::get_cell_value(ulong row, prop_id id) const function in table.h:
const_column_iter column = m_columns.find(id);
 
As a matter of fact, I get the same error in all three places in table.h where the m_columns.find function is called.
 
Any suggestions on what types of things to try?
Closed Sep 27, 2010 at 7:29 PM by terrymah

comments

terrymah wrote Sep 27, 2010 at 7:24 PM

I think the key point that error message was trying to make was the "discards qualifiers". I'm guessing at some level down the callstack their unordered_map implementation doesn't mark a member function as const when it should.

I'd follow up with the GCC people maintaining that platform if I were you. First, you might want to see if you can repo the issue outside of pstsdk: create a test app which trys to call unordered_map::find from inside a const member function.

wrote Sep 27, 2010 at 7:29 PM

wrote Feb 14, 2013 at 9:08 PM

wrote May 16, 2013 at 10:40 AM