]> git.pld-linux.org Git - packages/cups-filters.git/blame - cups-filters-1.28.17-c++17.patch
- updated libstdc++ version for -std=c++17
[packages/cups-filters.git] / cups-filters-1.28.17-c++17.patch
CommitLineData
4e802f46
KM
1
2From 104fba23b1c0c67c92777b3165c6dca99558a656 Mon Sep 17 00:00:00 2001
3From: Khem Raj <raj.khem@gmail.com>
4Date: Mon, 6 Feb 2023 18:13:52 -0800
5Subject: [PATCH] use noexcept(false) instead of throw() from c++17 onwards
6
7C++17 removed dynamic exception specifications [1]
8they had been deprecated since C++11, replace
9throw(whatever) with noexcept(false).
10
11[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14--- a/filter/pdftoraster.cxx
15+++ b/filter/pdftoraster.cxx
16@@ -2148,7 +2148,11 @@ int main(int argc, char *argv[]) {
17 /* For compatibility with g++ >= 4.7 compilers _GLIBCXX_THROW
18 * should be used as a guard, otherwise use traditional definition */
19 #ifndef _GLIBCXX_THROW
20+#if __cplusplus < 201703L
21 #define _GLIBCXX_THROW throw
22+#else
23+#define _GLIBCXX_THROW(x) noexcept(false)
24+#endif
25 #endif
26
27 void * operator new(size_t size) _GLIBCXX_THROW (std::bad_alloc)
28
This page took 0.10125 seconds and 4 git commands to generate.