summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-06-10 20:51:09 +0200
committerJulian Andres Klode <jak@debian.org>2025-06-10 20:51:09 +0200
commitd9b87e3e2b2615eb3be1e6a4413aa18384f04328 (patch)
tree50dec2998e48c21d8e83de37cd08267f986ad6f6 /apt-pkg
parentf9b5f49fe6030fc028bc93debf856d1ae75ca7ab (diff)
solver3: Avoid FTBFS with g++ 14.2 on arm{el,hf}
With an explicit {} initialization, g++ 14.2 on armhf and armel seems to generate the default constructor for the vector too early, or in the first place, outside of solver3.cc where the constructor is defined. Without {}, this compiles again. In file included from /usr/include/c++/14/vector:66, from /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/cachefilter.h:14: /usr/include/c++/14/bits/stl_vector.h: In instantiation of ‘constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = APT::Solver::Work; _Alloc = std::allocator<APT::Solver::Work>]’: /usr/include/c++/14/bits/stl_vector.h:531:7: required from here 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:369:49: error: invalid use of incomplete type ‘struct APT::Solver::Work’ 369 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /<<PKGBUILDDIR>>/apt-pkg/edsp.cc:22: /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/solver3.h:87:11: note: forward declaration of ‘struct APT::Solver::Work’ 87 | struct Work; | ^~~~ /usr/include/c++/14/bits/stl_vector.h: In instantiation of ‘constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = APT::Solver::Solved; _Alloc = std::allocator<APT::Solver::Solved>]’: /usr/include/c++/14/bits/stl_vector.h:531:7: required from here 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:369:49: error: invalid use of incomplete type ‘struct APT::Solver::Solved’ 369 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/solver3.h:88:11: note: forward declaration of ‘struct APT::Solver::Solved’ 88 | struct Solved; | ^~~~~~
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/solver3.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h
index 2331af869..435c1c279 100644
--- a/apt-pkg/solver3.h
+++ b/apt-pkg/solver3.h
@@ -201,7 +201,7 @@ class Solver
// and std::pop_heap() rather than a priority_queue because we need to
// be able to iterate over the queued work and see if a choice would
// invalidate any work.
- heap<Work> work{};
+ heap<Work> work;
// \brief Backlog of solved work.
//
@@ -209,7 +209,7 @@ class Solver
// here to revisit it later. This is similar to what MiniSAT calls the
// trail; one distinction is that we have both literals and our work
// queue to be concerned about
- std::vector<Solved> solved{};
+ std::vector<Solved> solved;
// \brief Propagation queue
std::queue<Var> propQ;