diff --git a/tests/src/testserver.cpp b/tests/src/testserver.cpp index 324582544..c30c6846b 100644 --- a/tests/src/testserver.cpp +++ b/tests/src/testserver.cpp @@ -8,6 +8,15 @@ #include #include "ServerInterface2.h" +struct EnumClassHash +{ + template + std::size_t operator()(T t) const + { + return static_cast(t); + } +}; + using Interface = sls::ServerInterface2; using func_ptr = int (*)(Interface &); @@ -24,7 +33,7 @@ int read_int(Interface &socket) { return 0; } -static std::unordered_map fmap{ +static std::unordered_map fmap{ {func_id::read_data, &read_data}, {func_id::read_int, &read_int}}; int main(int argc, char **argv) {