potassco / clingo

🤔 A grounder and solver for logic programs.
https://potassco.org/clingo
MIT License
606 stars 81 forks source link

Fix noexcept destructor in C++ API #481

Closed rkaminsk closed 7 months ago

rkaminsk commented 7 months ago

There are some constructors in the C++ API that finalize constructions where exceptions are possible. This PR adds explicit close methods that can be called before destruction to ensure the destructors do not throw. However, it is still the responsibility of the user to ensure that there are no simultaneous exceptions.