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.
14 lines
207 B
C++
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...>;
|
|
|
|
}
|