File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2727
2828#include < stdlib.h>
2929#include < memory>
30+ #include < functional>
3031#include < string>
3132
3233#include " httpserver/http_response.hpp"
@@ -40,10 +41,10 @@ namespace httpserver {
4041class webserver ;
4142class http_request ;
4243
43- typedef const std::shared_ptr<http_response>(*render_ptr)( const http_request&);
44- typedef bool (*validator_ptr)( const std::string&);
45- typedef void (*log_access_ptr)( const std::string&);
46- typedef void (*log_error_ptr)( const std::string&);
44+ typedef std::function< const std::shared_ptr<http_response>(const http_request&)> render_ptr ;
45+ typedef std::function< bool (const std::string&)> validator_ptr ;
46+ typedef std::function< void (const std::string&)> log_access_ptr ;
47+ typedef std::function< void (const std::string&)> log_error_ptr ;
4748
4849class create_webserver {
4950 public:
You can’t perform that action at this time.
0 commit comments