erick-alcachofa 583b20230d
fix(Utils): Inherit from Ts in OverloadSet
Signed-off-by: erick-alcachofa <erick@artichoke.dev>

This commit changes the `OverloadSet` utility class to publicly inherit
from its template parameters `Ts...`. This allows the `operator()` from
each provided type to be brought into the overload set, efectively
fixing it's functionality that would be broken otherwise.

It also includes the missing `<ranges>` header in the test utilities.
2025-10-15 16:02:27 -06:00

14 lines
207 B
C++

#pragma once
namespace arti::lang {
template <typename ...Ts>
struct OverloadSet : Ts... {
using Ts::operator()...;
};
template <typename ...Ts>
OverloadSet(Ts...) -> OverloadSet<Ts...>;
}