I have typedef for a function pointer:
typedef bool(WlanApiWrapper::* (connect_func) )(WLAN_AVAILABLE_NETWORK, const char *, const char *);
and have a method that returns a pointer to function:
const auto connect_method = map_algorithm_to_method(*network)
So I want to call that like that:
(*this.*connect_method)(*network, ssid, pass);
but gets error:
Error (active) E0315 the object has type qualifiers that are not compatible with the member function CppWlanHack C:\Projects\CppWlanHack\CppWlanHack\WlanApiWrapper.cpp 52
but when I call that like that:
WlanApiWrapper f;
(f.*connect_method)(*network, ssid, pass);
all is building...
How can I call the method without creating an object, because I've already had an object (this pointer)