RafaGago / mini-async-log

Non bloated asynchronous logger
Other
220 stars 20 forks source link

compile error with too many arguments #17

Closed funkyshoc closed 7 years ago

funkyshoc commented 7 years ago

I get a nice compiler error in one case where I exceed 14 arguments. It is nice that it catches the problem on compile time in that case. However if I do want to exceed 14 arguments, is there a define or some config option I can set to allow additional arguments?

RafaGago commented 7 years ago

This is because the code was written to be compatible with Visual Studio 2010 and I thought that 14 parameters were enough for most needs.

To solve it variadic templates detection and a variadic template implementation needs to be implemented. I just coded this "beauty" for up to 14 parameters:

https://github.com/RafaGago/mini-async-log/blob/master/include/mal_log/mal_interface.hpp#L67

RafaGago commented 7 years ago

PR's are welcome

funkyshoc commented 7 years ago

May do a modify and check in but that restriction is fine for now.