You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/hb-vector.hh:256:21: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'hb_user_data_array_t::hb_user_data_item_t' and 'hb_user_data_array_t::hb_user_data_item_t') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator]
if (arrayZ[i] == v)
~~~~~~~~~ ^ ~
src/hb-object.hh:56:26: note: in instantiation of function template specialization 'hb_vector_t<hb_user_data_array_t::hb_user_data_item_t>::find<hb_user_data_array_t::hb_user_data_item_t>' requested here
item_t *item = items.find (v);
^
src/hb-static.cc:98:22: note: in instantiation of function template specialization 'hb_lockable_set_t<hb_user_data_array_t::hb_user_data_item_t, hb_mutex_t>::replace_or_insert<hb_user_data_array_t::hb_user_data_item_t>' requested here
bool ret = !!items.replace_or_insert (item, lock, (bool) replace);
^
src/hb-object.hh:172:10: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
bool operator == (hb_user_data_item_t &other) const { return key == other.key; }
^
1 error generated.
The text was updated successfully, but these errors were encountered:
We get a
-Wambiguous-reversed-operator
warning in-std=c++2a
mode in new clang builds, maybe an interesting thing or maybe not,clang -c src/harfbuzz.cc src/hb-subset*.cc -DHB_NO_MT -Werror -std=c++2a
After the fix the warning can be removed from https://github.com/harfbuzz/harfbuzz/blob/5ea11cb/.circleci/config.yml#L121
The text was updated successfully, but these errors were encountered: