From 58e211355fe9ee2772c94800d981b08596169fdf Mon Sep 17 00:00:00 2001 From: Florian Rupprecht Date: Thu, 25 Nov 2021 15:14:45 +0100 Subject: [PATCH] Constrain and warn GCC 8 bug --- include/crow/app.h | 2 +- include/crow/settings.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/crow/app.h b/include/crow/app.h index ef4cec30d..d8845deb2 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -82,7 +82,7 @@ namespace crow ///Create a route using a rule (**Use CROW_ROUTE instead**) template -#ifdef CROW_GCC8_WORKAROUND +#ifdef CROW_GCC83_WORKAROUND auto& route(std::string&& rule) #else auto route(std::string&& rule) diff --git a/include/crow/settings.h b/include/crow/settings.h index a38cf7b73..1437036c7 100644 --- a/include/crow/settings.h +++ b/include/crow/settings.h @@ -58,6 +58,10 @@ #endif #endif -#if __GNUC__ == 8 && __cplusplus > 201103L -#define CROW_GCC8_WORKAROUND +#if __GNUC__ == 8 && __GNUC_MINOR__ < 4 +#if __cplusplus > 201103L +#define CROW_GCC83_WORKAROUND +#else +#warning "GCC 8.1 - 8.3 have a bug that prevents crow from compiling with C++11. Please update GCC to > 8.3 or use C++ > 11." +#endif #endif