]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compilation with boost 1.78. 13180/head
authorDavid Wells <drwells@email.unc.edu>
Tue, 4 Jan 2022 17:46:30 +0000 (12:46 -0500)
committerDavid Wells <drwells@email.unc.edu>
Thu, 6 Jan 2022 15:30:04 +0000 (10:30 -0500)
I bisected (fortunately Boost.Geometry a header-only library so adding the
include directory sufficed) and
https://github.com/boostorg/geometry/commit/6eb9e238bcb37e26dc31d16acf826784a2ba30f4
is where this problem starts for us. See also
https://github.com/boostorg/geometry/issues/792 - the easiest fix for all such
issues is to just include the project header `boost/geometry/geometry.hpp`.

In this particular case, if you look at the commit which causes grid_tools.cc
fails to compile, its because we were relying on some implicit includes. In
particular, we need the distance header to find the distance between points and
boxes, but that was previously included in another file.

include/deal.II/numerics/rtree.h
tests/boost/rtree_01.cc

index 68fa11e2e365291c339a06f19cf94f9afa15fb5d..a40e242539fc778e90e1ba8e0fbdd3e25539a101 100644 (file)
@@ -26,6 +26,8 @@
 #include <deal.II/boost_adaptors/segment.h>
 
 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
+#include <boost/geometry/algorithms/distance.hpp>
+
 #ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
 #  define BOOST_ALLOW_DEPRECATED_HEADERS
 #endif
index c0a25a50a0dd5957ff1017d53764cb3038edc02b..40b2e852b209ec9d3948087833b0aa59cc54b0f0 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <deal.II/boost_adaptors/point.h>
 
+#include <boost/geometry/algorithms/distance.hpp>
 #include <boost/geometry/index/rtree.hpp>
 #include <boost/geometry/strategies/strategies.hpp>
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.