Merge pull request #396 from CrowCpp/reference_middleware

Add `std::remove_reference` to CROW_MIDDLEWARES
This commit is contained in:
Farook Al-Sammarraie 2022-04-09 15:43:40 +03:00 committed by GitHub
commit 03f2e266c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@
#else #else
#define CROW_ROUTE(app, url) app.route<crow::black_magic::get_parameter_tag(url)>(url) #define CROW_ROUTE(app, url) app.route<crow::black_magic::get_parameter_tag(url)>(url)
#define CROW_BP_ROUTE(blueprint, url) blueprint.new_rule_tagged<crow::black_magic::get_parameter_tag(url)>(url) #define CROW_BP_ROUTE(blueprint, url) blueprint.new_rule_tagged<crow::black_magic::get_parameter_tag(url)>(url)
#define CROW_MIDDLEWARES(app, ...) middlewares<decltype(app), __VA_ARGS__>() #define CROW_MIDDLEWARES(app, ...) middlewares<std::remove_reference<decltype(app)>::type, __VA_ARGS__>()
#endif #endif
#define CROW_CATCHALL_ROUTE(app) app.catchall_route() #define CROW_CATCHALL_ROUTE(app) app.catchall_route()
#define CROW_BP_CATCHALL_ROUTE(blueprint) blueprint.catchall_rule() #define CROW_BP_CATCHALL_ROUTE(blueprint) blueprint.catchall_rule()