13 lines
289 B
C++
13 lines
289 B
C++
#pragma once
|
|
#include <utility>
|
|
|
|
namespace utempl {
|
|
template <typename... Fs>
|
|
inline constexpr auto Overloaded(Fs&&... fs) {
|
|
struct Overloaded : public std::remove_cvref_t<Fs>... {
|
|
using Fs::operator()...;
|
|
};
|
|
return Overloaded{std::forward<Fs>(fs)...};
|
|
};
|
|
|
|
} // namespace utempl
|