What version of HiGHS and what language are you using?
Version: v1.15.1
Language: C++ (built via Conan)
Which solver are you using (e.g. LP, MIP, QP)
MIP — the issue is in src/highs/mip/HighsMipWorker.h.
What operating system (Linux, Windows, ...) and version?
macOS with Xcode 26.6 (Apple Clang, newer modular libc++). Not seen on older Xcode / your macos-latest CI, which uses an older libc++.
What did you do?
Steps to reproduce the behaviour:
- Build HiGHS from source on macOS with Xcode 26.x (Debug, unity build as HiGHS configures by default).
- Compilation of the MIP sources fails.
The cause: HighsMipWorker.h holds a std::unique_ptr<HighsSearch> where HighsSearch is only forward-declared, and defines the destructor inline in the header:
class HighsSearch; // line 21 — forward declaration only
...
std::unique_ptr<HighsSearch> search_ptr_; // line 71
...
~HighsMipWorker() { // line 89 — inline destructor
search_ptr_.reset(); // line 90 — requires complete HighsSearch
sepa_ptr_.reset();
}
Destroying the unique_ptr instantiates std::default_delete<HighsSearch>, which requires a complete type. Xcode 26's libc++ enforces this with a hard static_assert; older libc++/libstdc++ only warned, which is why it built before.
What did you expect to see
A clean compile, as on older toolchains.
What did you see instead?
.../c++/v1/__memory/unique_ptr.h:75:19: error: invalid application of 'sizeof' to an incomplete type 'HighsSearch'
75 | static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
note: in instantiation of member function 'std::default_delete<HighsSearch>::operator()' requested here
note: in instantiation of member function 'std::unique_ptr<HighsSearch>::reset' requested here
90 | search_ptr_.reset();
.../mip/HighsMipWorker.h:21:7: note: forward declaration of 'HighsSearch'
21 | class HighsSearch;
make[3]: *** [highs/CMakeFiles/highs.dir/Unity/unity_3_cxx.cxx.o] Error 1
Anything else we should know about your project / environment
Suggested fix — declare the destructor in the header and define it out-of-line in HighsMipWorker.cpp, where HighsSearch.h is already included (canonical handling for unique_ptr to a forward-declared type):
// HighsMipWorker.h
~HighsMipWorker();
// HighsMipWorker.cpp (HighsSearch is complete here)
HighsMipWorker::~HighsMipWorker() = default;
Alternatively #include "mip/HighsSearch.h" in the header.
What version of HiGHS and what language are you using?
Version: v1.15.1
Language: C++ (built via Conan)
Which solver are you using (e.g. LP, MIP, QP)
MIP — the issue is in
src/highs/mip/HighsMipWorker.h.What operating system (Linux, Windows, ...) and version?
macOS with Xcode 26.6 (Apple Clang, newer modular libc++). Not seen on older Xcode / your
macos-latestCI, which uses an older libc++.What did you do?
Steps to reproduce the behaviour:
The cause:
HighsMipWorker.hholds astd::unique_ptr<HighsSearch>whereHighsSearchis only forward-declared, and defines the destructor inline in the header:Destroying the
unique_ptrinstantiatesstd::default_delete<HighsSearch>, which requires a complete type. Xcode 26's libc++ enforces this with a hardstatic_assert; older libc++/libstdc++ only warned, which is why it built before.What did you expect to see
A clean compile, as on older toolchains.
What did you see instead?
Anything else we should know about your project / environment
Suggested fix — declare the destructor in the header and define it out-of-line in
HighsMipWorker.cpp, whereHighsSearch.his already included (canonical handling forunique_ptrto a forward-declared type):Alternatively
#include "mip/HighsSearch.h"in the header.