mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
GCC 8 workaround
This commit is contained in:
parent
e87ec70179
commit
7a0576546c
@ -82,6 +82,9 @@ namespace crow
|
||||
|
||||
///Create a route using a rule (**Use CROW_ROUTE instead**)
|
||||
template <uint64_t Tag>
|
||||
#ifdef CROW_GCC8_WORKAROUND
|
||||
auto& route(std::string&& rule)
|
||||
#else
|
||||
auto route(std::string&& rule)
|
||||
#ifdef CROW_CAN_USE_CPP17
|
||||
-> typename std::invoke_result<decltype(&Router::new_rule_tagged<Tag>),
|
||||
@ -89,6 +92,7 @@ namespace crow
|
||||
#else
|
||||
-> typename std::result_of<decltype (&Router::new_rule_tagged<Tag>)(
|
||||
Router, std::string&&)>::type
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
return router_.new_rule_tagged<Tag>(std::move(rule));
|
||||
|
@ -57,3 +57,7 @@
|
||||
#define noexcept throw()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __GNUC__ == 8 && __cplusplus > 201103L
|
||||
#define CROW_GCC8_WORKAROUND
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user