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.
This commit is contained in:
erick-alcachofa 2025-10-15 16:02:27 -06:00
parent 9626ac07c8
commit 583b20230d
Signed by: me
GPG Key ID: 6FA5F8643444BAFA
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,7 @@
namespace arti::lang { namespace arti::lang {
template <typename ...Ts> template <typename ...Ts>
struct OverloadSet { struct OverloadSet : Ts... {
using Ts::operator()...; using Ts::operator()...;
}; };

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include <random> #include <random>
#include <ranges>
#include <artichoke/Coroutine/Generator.hpp> #include <artichoke/Coroutine/Generator.hpp>