edit: just tested. It doesn't compile with C++98 because of std::function.
edit2: fix for that:
--- a/include/tins/crypto.h
+++ b/include/tins/crypto.h
@@ -35,9 +35,6 @@
#include <map>
#include <string>
#include <vector>
-#ifdef TINS_HAVE_WPA2_CALLBACKS
- #include <functional>
-#endif // TINS_HAVE_WPA2_CALLBACKS
#include <tins/macros.h>
#include <tins/handshake_capturer.h>
@@ -268,8 +265,8 @@ public:
* The first argument to the function will be the access point's SSID and
* the second one its BSSID.
*/
- typedef std::function<void(const std::string&,
- const address_type&)> ap_found_callback_type;
+ typedef void(*ap_found_callback_type)(const std::string&,
+ const address_type&);
/**
* The type used to store the callback type used when a new handshake
@@ -279,9 +276,9 @@ public:
* the second one its BSSID. The third argument will be the client's hardware
* address.
*/
- typedef std::function<void(const std::string&,
+ typedef void(*handshake_captured_callback_type) (const std::string&,
const address_type&,
- const address_type&)> handshake_captured_callback_type;
+ const address_type&);
#endif // TINS_HAVE_WPA2_CALLBACKS
why is there still C++98 support?
edit: just tested. It doesn't compile with C++98 because of std::function.
edit2: fix for that: