Casting function pointers to sasl_callback_ft
Ted Yu <[email protected]>
| Newsgroups | gmane.comp.security.cyrus.sasl |
|---|---|
| Message-ID | <CALte62yVQtC3gOcsOgHPXJrL-i90om1QE7hOgEu2d6LVZC8e4g@mail.gmail.com> |
Hi,
I am writing C++ code which calls sasl_client_init(). I defined plugin
functions such as:
int GetPluginPath(void *context,
const char **path) {
However, the compiler (C++11) doesn't allow me to assign function pointer
to proc member of sasl_callback_t :
connection/connection-factory.cc:164:22: error: reinterpret_cast from 'int
(SaslHandler::*)(void *, int, const char )' to 'sasl_callback_ft' (aka 'int
()()') is not allowed
callback->proc = reinterpret_cast<sasl_callback_ft>
(&SaslHandler::SaslLogFn);
Has anyone seen the above error ?
If so, how did you get past it ?
Thanks