crow: work around gcc bug 87513
| In file included from src/webserver_main.cpp:1:
| crow/include/crow/app.h: In instantiation of ...blah blah blah
| src/webserver_main.cpp:110:1: required from here
| crow/include/crow/app.h:61:10: internal compiler error: in write_expression, at cp/mangle.c:3050
| auto route(std::string&& rule) -> typename std::result_of<
| ^~~~~
| Please submit a full bug report,
We lose c++11 compatibility. ¯\_(ツ)_/¯
Change-Id: Ie30805a88355be0c7adb7b70234989a16b4f1b45
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/crow/include/crow/app.h b/crow/include/crow/app.h
index 7051ec8..c919245 100644
--- a/crow/include/crow/app.h
+++ b/crow/include/crow/app.h
@@ -57,9 +57,7 @@
return router.newRuleDynamic(rule);
}
- template <uint64_t Tag>
- auto route(std::string&& rule) -> typename std::result_of<
- decltype (&Router::newRuleTagged<Tag>)(Router, std::string&&)>::type
+ template <uint64_t Tag> auto& route(std::string&& rule)
{
return router.newRuleTagged<Tag>(std::move(rule));
}