tools/inc/poly.h | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 0c54c3f77a1ffc410f9207f8b29bf0774fc97962
Author: Stephan Bergmann <[email protected]>
AuthorDate: Mon Feb 2 21:07:20 2026 +0100
Commit: Stephan Bergmann <[email protected]>
CommitDate: Mon Feb 2 22:31:40 2026 +0100
Point appears to be required to be a complete type here
...contrary to what c511c654344ad8fdde7321e525c1273e4913ee8c "tdf#146619 Use
more forward declarations in include/tools" apparently assumed, as seen at
least
with recent Clang 23 trunk against recent libstdc++ 16 trunk,
> In file included from tools/source/generic/poly2.cxx:22:
> In file included from tools/inc/poly.h:22:
> In file included from
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/memory:80:
>
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:131:18:
error: invalid application of 'sizeof' to an incomplete type 'Point'
> 131 | static_assert(sizeof(_Tp)>0,
> | ^~~~~~~~~~~
>
~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:684:4:
note: in instantiation of function template specialization
'std::default_delete<Point[]>::operator()<Point>' requested here
> 684 | get_deleter()(__ptr);
> | ^
> tools/inc/poly.h:33:21: note: in instantiation of member function
'std::unique_ptr<Point[]>::~unique_ptr' requested here
> 33 | ImplPolygon() : mnPoints(0) {}
> | ^
> include/tools/poly.hxx:60:7: note: forward declaration of 'Point'
> 60 | class Point;
> | ^
Change-Id: I0b96222dcec7e98b974151004248a91ba1854e60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
diff --git a/tools/inc/poly.h b/tools/inc/poly.h
index f61850b352a3..ab92bd8b100e 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -20,6 +20,7 @@
#include <sal/types.h>
#include <memory>
+#include <tools/gen.hxx>
#include <tools/poly.hxx>
class SAL_WARN_UNUSED ImplPolygon