Skip to content

Commit

Permalink
chore: consider any name bound to multiple symbols to be an overload set
Browse files Browse the repository at this point in the history
  • Loading branch information
sdkrystian committed May 30, 2024
1 parent 95a39a4 commit ed4d49b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions include/mrdocs/Corpus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,23 +234,12 @@ traverseOverloads(
{
const Info& member = get(id);
const auto& lookup = S.Lookups.at(member.Name);
auto first_func = std::ranges::find_if(
lookup, [this](const SymbolID& elem)
{
#if 0
const Info& I = get(elem);
return I.isFunction() || I.isGuide();
#else
return get(elem).isFunction();
#endif
});
if(lookup.size() == 1 ||
first_func == lookup.end())
if (lookup.size() <= 1)
{
visit(member, std::forward<F>(f),
std::forward<Args>(args)...);
}
else if(*first_func == id)
else if(lookup.front() == id)
{
OverloadSet overloads(member.Name,
member.Namespace.front(),
Expand Down

0 comments on commit ed4d49b

Please sign in to comment.