utempl/include/utempl/overloaded.hpp
2024-02-27 18:40:00 +00:00

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