Hash Template Lookup Fails With Clang

Issue #11 new
Jonathan Howard
created an issue

With clang, hash.h fails to compile due to strict two phase lookup.

I fixed it locally by forward declaring the template above where it was used.

../../../src/foundation/hash.h:101:22: error: call to function 'find' that is neither visible in the template definition nor found by
      argument-dependent lookup
                        FindResult last = find(h, h._data[fr.data_i].key);
                                          ^
../../../src/foundation/hash.h:188:5: note: in instantiation of function template specialization 'foundation::hash_internal::erase<int>'
      requested here
                                erase(h, fr);
                                ^
../../../src/foundation/hash.h:248:19: note: in instantiation of function template specialization
      'foundation::hash_internal::find_and_erase<int>' requested here
                        hash_internal::find_and_erase(h, key);

Comments (0)

  1. Log in to comment