librecad/add-boost-tuple-include-to-fix-build.patch

36 lines
1.1 KiB
Diff

From: Jiri Slaby <jslaby@suse.cz>
Date: Tue, 4 May 2021 09:25:03 +0200
Subject: add boost tuple include to fix build
Patch-mainline: Submitted pr#1345
References: boost 1.76 build failure
With boost 1.76, we see:
lib/engine/rs_ellipse.cpp:70:15: error: 'tuple' in namespace 'boost::math' does not name a template type
70 | boost::math::tuple<double, double, double> operator()(double const& z) const {
| ^~~~~
Fix this by including the proper boost header.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
librecad/src/lib/engine/rs_ellipse.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/librecad/src/lib/engine/rs_ellipse.cpp b/librecad/src/lib/engine/rs_ellipse.cpp
index 291f734ea6b1..d47bf6ca4a12 100644
--- a/librecad/src/lib/engine/rs_ellipse.cpp
+++ b/librecad/src/lib/engine/rs_ellipse.cpp
@@ -48,6 +48,9 @@
#include <boost/version.hpp>
#include <boost/math/tools/roots.hpp>
#include <boost/math/special_functions/ellint_2.hpp>
+#if BOOST_VERSION > 104500
+#include <boost/math/tools/tuple.hpp>
+#endif
#endif
namespace{
--
2.31.1