by hans0l074 · 9y ago · 0 comments
However, given it is a C API you will get the usual C unsafe code, instead of C++'s improvements regarding type safety.
Wouldn't one compile hiredis in C, their app in C++, and link the two together?
In general compiling C code with a C++ compiler isn't the path of least resistance.
And even if some things leak into the headers they might be accepted by compiler extensions.
But yes, in general if a c library's headers are hostile to cross-language usage then using it from c++ won't be trivial.