The function offers several overrides, but when called like:
It’s interpreted as ambiguous by clang++ (and I assume every other compiler out there).
The ambiguity comes from both String and StringHash being able to be constructed with a string literal, so there’s no way for the compiler to differentiate from the different overrides:
UIElement* GetChild(const String& name, bool recursive = false) const;
UIElement* GetChild(const StringHash& key, const Variant& value = Variant::EMPTY, bool recursive = false)
It’s not that it’s a big deal, but it’s certainly confusing. I’m not posting this as an issue because I don’t think it really is.
Any thoughts on how could this be improved (or if it needs improving at all)?