Skip to content
Snippets Groups Projects

Improve versatility and robustness of `cpptype`, and document it in the user guide

Merged Frederik Hennig requested to merge fhennig/cpptypes into master
All threads resolved!

This MR improves the implementation and interface of cpptype, adds a number of tests, extends the STL API reflections using it, and introduces a user guide section on API reflection.

lang.cpptype

  • Fix correct cloning of CppType, as required for (de)constify, by keeping and passing on the raw template parameters
  • Customize the template formatter to reject superfluous template arguments
  • Have cpptype return a CppTypeFactory object which is used to instantiate class templates, and apply const and ref qualifications
  • Introduce the convenience subblass CppClass of AugExpr to simplify the definition of API reflections for C++ classes

lang.cpp.std

  • Update reflections of C++ STL classes to use the new features of cpptype

Composer

  • Remove the undocumented cpptype method from the composer, to avoid confusion about its name

Documentation

  • Add a user guide section on cpptype and API reflection using CppClass
  • Add myst-nb as the MyST markdown engine in order to parse and execute Jupyter and text-based notebooks

Merge request reports

Pipeline #71983 passed

Pipeline passed for 3d2dfa9d on fhennig/cpptypes

Test coverage 85.00% (0.00%) from 1 job
Approval is optional

Merged by Christoph AltChristoph Alt 1 month ago (Jan 20, 2025 3:12pm UTC)

Merge details

  • Changes merged into master with 8f261ded (commits were squashed).
  • Deleted the source branch.

Pipeline #72319 passed

Pipeline passed for 8f261ded on master

Test coverage 85.00% (0.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply