diff --git a/include/crow/app.h b/include/crow/app.h index 3d2f22fb8..ef4cec30d 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -82,6 +82,9 @@ namespace crow ///Create a route using a rule (**Use CROW_ROUTE instead**) template +#ifdef CROW_GCC8_WORKAROUND + auto& route(std::string&& rule) +#else auto route(std::string&& rule) #ifdef CROW_CAN_USE_CPP17 -> typename std::invoke_result), @@ -89,6 +92,7 @@ namespace crow #else -> typename std::result_of)( Router, std::string&&)>::type +#endif #endif { return router_.new_rule_tagged(std::move(rule)); diff --git a/include/crow/settings.h b/include/crow/settings.h index bdbd068b0..a38cf7b73 100644 --- a/include/crow/settings.h +++ b/include/crow/settings.h @@ -57,3 +57,7 @@ #define noexcept throw() #endif #endif + +#if __GNUC__ == 8 && __cplusplus > 201103L +#define CROW_GCC8_WORKAROUND +#endif