Only MSVC manage to compile this (while still printing an Intellisense error!)
Didnt manage to compile that with neither clang or gcc using godbolt
https://godbolt.org/z/5PK7vaoeo
any idea how to make that work for the other compilers? The two fields in the Argument struct are required (a void lambda with no parameters would work too instead of T), same for the compile time hash computation, required.
constexpr uint32_t FNV_PRIME_32 = 16777619u;
constexpr uint32_t FNV_OFFSET_32 = 2166136261u;
constexpr uint32_t fnv1a_32(const char* str, uint32_t hash = FNV_OFFSET_32) noexcept
{
return (hash ^ static_cast<uint32_t>(str[0])) * FNV_PRIME_32;
}
template<typename T>
struct Argument
{
const char* sig;
T func;
};
template<Argument ar...
