Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Boost.OpenMethod :: Boost.OpenMethod

Boost.OpenMethod

Boost.OpenMethod implements open-(multi-)methods in C++17 and above.

Features

  • Single dispatch can be as fast as equivalent virtual function calls.

  • Multiple dispatch in constant time (for a given number of virtual parameters).

  • Redundancy-free multiple dispatch tables.

  • Inter-operation with standard smart pointers, extensible to other pointer-like types.

  • Exception agnostic by default.

  • Macro-based interface for convenience.

  • Macro-free interface for inter-operation with templates.

  • Customization points for alternative RTTI systems, error handling, vptr placement, etc.

  • Headers-only.

Requirements

The library requires an optimizing compiler supporting C++17 or above.

Tested Compilers

Boost.OpenMethod is tested with the following compilers:

  • clang: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20

  • gcc: 8, 9, 10, 11, 12, 13, 14, 15

  • msvc: 14.3

  • icpx

and on the following platforms:

  • Linux

  • macOS

  • Windows

  • s390x

Quality Assurance

The development infrastructure for the library includes these per-commit analyses:

  • Coverage reports

  • Clang sanitizers

  • Compilation and tests on Drone.io and GitHub Actions

Acknowledgments

I would like to thank the C++ Alliance for their support, in particular Joaquín M. López Muñoz for encouraging me to submit my library and being the first to endorse it; and Dmitryi Arkhipov for volunteering to be the review manager.

Thanks to the members of the Boost community who posted a formal review:

  • Andrzej Krzemienski

  • Christian Mazakas

  • Joaquin M López Muñoz

  • Klemens Morgenstern

  • Ruben Perez

  • Yannick Le Goc

Also thanks to Steven Watanabe for his cogent feedback and advice, and all the people who posted remarks and suggestions.

This work was strongly influenced by the following papers:

Finally, thanks to Prof. J.D. Garcia, of the Universidad Carlos III in Madrid, for organizing the "using std::cpp" conference, and introducing me to Joaquín.