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:
parent
9626ac07c8
commit
583b20230d
@ -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()...;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <random>
|
#include <random>
|
||||||
|
#include <ranges>
|
||||||
|
|
||||||
#include <artichoke/Coroutine/Generator.hpp>
|
#include <artichoke/Coroutine/Generator.hpp>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user