Factory function that creates an Overload from the given callables.
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Ts>
[[nodiscard]]
constexpr
Overload<std::decay_t<Ts>...>
makeOverload(Ts&&... xs) noexcept(/* see-below */);
Prefer this over constructing Overload directly when you need perfect forwarding and decayed storage.
auto visitor = fn::makeOverload(
[](int) { return 1; },
[](double) { return 2; }
);
This function is potentially-throwing unless (std::is_nothrow_constructible_v<std::decay_t<Ts>, Ts &&> && ...).
An Overload whose base classes are the decayed types of the provided callables.
The return value should not be discarded.
| Name | Description |
|---|---|
| xs | The callables to combine. |