
On Sun, 27 Apr 2025 at 15:15, Дмитрий Архипов via Boost < boost@lists.boost.org> wrote:
Dear Boost community. The peer review of the proposed Boost.OpenMethod will start on 28th of April and continue until May 7th. OpenMethods implements open methods in C++. Those are "virtual functions" defined outside of classes.
Thank you, this is a welcome development. I am working through the documents and found myself a little troubled that there is a need to initialise the subsystem in main(): #include <boost/openmethod/compiler.hpp> // only needed in the file that calls boost::openmethod::initialize() auto main() -> int { boost::openmethod ::initialize(); // ... } This prevents this library being used as a dependent subsystem within other libraries, as the publisher of the library would need to communicate the need for this manual initialisation down the chain of dependent projects. This is brittle. It occurs to me that this can be solved using the Schwartz Counter (or Nifty Counter) method, which because of inline variables, works fully using only header files as of C++17. In case this is new information, the Schwartz Counter is the mechanism by which std::cout and std::cin are made available by the standard library. Thanks for your time.