Add Utils::Overloaded helper
This commit is contained in:
19
engine/include/nova/utils/overloaded.hpp
Normal file
19
engine/include/nova/utils/overloaded.hpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2025, Jayden Grubb <contact@jaydengrubb.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Nova::Utils {
|
||||||
|
|
||||||
|
template<typename... Ts>
|
||||||
|
struct Overloaded : Ts... {
|
||||||
|
using Ts::operator()...;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename... Ts>
|
||||||
|
Overloaded(Ts...) -> Overloaded<Ts...>;
|
||||||
|
|
||||||
|
} // namespace Nova::Utils
|
||||||
Reference in New Issue
Block a user