From d101a9275054d51b1082e31bbfe2835123ce1f2e Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Mon, 8 Mar 2021 16:51:42 +0400 Subject: [PATCH] Support old Glibmm only with libstdc++. --- src/local_glibmm.h | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/src/local_glibmm.h b/src/local_glibmm.h index 77bdcc7..d59a230 100644 --- a/src/local_glibmm.h +++ b/src/local_glibmm.h @@ -16,31 +16,12 @@ Copyright: // Glibmm before 2.50.1 uses throw(...) exception specifications which are invalid in C++17. // Try to work around that. #ifdef APP_GLIBMM_USES_THROW - // include stdlib, to avoid throw() macro errors there. - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include + #if !__has_include() + #error "This version of GLibmm is incompatible with C++17. Use GLibmm 2.50.1 or later." + #endif + + // include complete stdlib, to avoid throw() macro errors there. + #include // libstdc++ only #define throw(a) // glibmm uses dynamic exception specifications, remove them. #include