seen at least with recent GCC 16 trunk,
> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
> from ~/gcc/inst/include/c++/16.0.1/memory:82,
> from include/rtl/stringconcat.hxx:22,
> from include/rtl/string.hxx:51,
> from include/rtl/ustring.hxx:45,
> from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/Exception.hdl:9,
> from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hdl:6,
> from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hpp:6,
> from include/com/sun/star/uno/Reference.hxx:32,
> from slideshow/source/inc/shape.hxx:23,
> from slideshow/source/inc/box2dtools.hxx:12,
> from slideshow/source/engine/box2dtools.cxx:10:
> In destructor ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
> inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
> inlined from ‘box2d::utils::box2DBody::~box2DBody()’ at slideshow/source/inc/box2dtools.hxx:333:7,
> inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:18,
> inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
> inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
> inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
> inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
> inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1128:13: error: array subscript 3 is outside array bounds of ‘std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic> [1]’ [-Werror=array-bounds=]
> 1128 | if (_M_pi != nullptr)
> | ^~~~~
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
> from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
> from ~/gcc/inst/include/c++/16.0.1/string:46,
> from ~/gcc/inst/include/c++/16.0.1/bits/locale_classes.h:43,
> from ~/gcc/inst/include/c++/16.0.1/bits/ios_base.h:43,
> from ~/gcc/inst/include/c++/16.0.1/ios:46,
> from ~/gcc/inst/include/c++/16.0.1/bits/ostream.h:43,
> from ~/gcc/inst/include/c++/16.0.1/ostream:42,
> from include/com/sun/star/uno/Reference.hxx:29:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
> inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
> inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
> inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
> inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at offset 24 into object of size 24 allocated by ‘operator new’
> 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
> | ^
> In destructor ‘box2d::utils::box2DBody::~box2DBody()’,
> inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:18,
> inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
> inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = box2d::utils::box2DBody]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
> inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
> inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
> inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> slideshow/source/inc/box2dtools.hxx:333:7: error: array subscript ‘box2d::utils::box2DBody[0]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
> 333 | class box2DBody
> | ^~~~~~~~~
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
> inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
> inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
> inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
> inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at offset 16 into object of size 24 allocated by ‘operator new’
> 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
> | ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
> inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
> inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
> inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<box2d::utils::box2DBody, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
> 670 | ~_Sp_counted_ptr_inplace() noexcept { }
> | ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
> inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
> inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
> inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
> inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 24 allocated by ‘operator new’
> 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
> | ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
> inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = box2d::utils::box2DBody; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
> inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
> inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
> inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:731:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<box2d::utils::box2DBody, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [24]’ [-Werror=array-bounds=]
> 670 | ~_Sp_counted_ptr_inplace() noexcept { }
> | ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
> inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
> inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
> inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_deleter<b2Body*, box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
> inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = b2Body*; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
> inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
> inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; <template-parameter-2-3> = void; _Tp = b2Body]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
> inlined from ‘box2d::utils::Box2DBodySharedPtr box2d::utils::box2DWorld::createStaticBody(const slideshow::internal::ShapeSharedPtr&)’ at slideshow/source/engine/box2dtools.cxx:669:6:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 24 allocated by ‘operator new’
> 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
> | ^
Change-Id: I437410fb3ca777405f8153c13c3e3cc47bc6e8b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197839
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Impress Slideshow Engine
3D Transitions
The 3D transitions are slideshow transition engine using OpenGL and
are located in slideshow/source/engine/OGLTrans/. They were initially
written by GSOC student Shane.M.Mathews. Radek has later polished the
code a bit, added few new 3D transitions, added infrastructure for
vertex and fragment shaders. Wrote few transitions with fragment shader
too.
Physics Animation Effects
Physics animation effects are simulated by external 2d physics engine
library Box2D. They don't directly call Box2D functions but instead
use the wrapper in:
slideshow/source/inc/box2dtools.hxxslideshow/source/engine/box2dtools.cxx
The wrapper has two corresponding classes to manage the Box2D world
and Box2D bodies.
When a physics animation starts, a Box2DWorld is initiated and
populated with every shape that is part of the foreground (which are
shapes that do not belong to the master slide and not a background
shape).
After creation until the end of the slide (not the whole slideshow)
the Box2D World isn't destroyed and reused. But the bodies that
represent the shapes in the slide get destroyed when there's a point
in time that there's no physics animation in progress. And recreated
when another physics animation starts.
If there are multiple physics animations in parallel only one of them takes the role of stepping through the simulation.
If there are other animation effects that go in parallel which change
the shape position, rotation, or visibility - they also report the
change to Box2DWorld. These updates are collected in a queue in
Box2DWorld and processed before stepping through the simulation.
To achieve convincing results these updates are performed by setting
the Box2D body's linear velocity or angular velocity instead of
setting directly it's position or rotation.