Skip to content

Polyfill cetl::optional, extend the testing suite - #89

Merged
pavel-kirienko merged 46 commits into
mainfrom
issue8
Feb 28, 2024
Merged

pavel-kirienko merged 46 commits into
mainfrom
issue8

Conversation

@pavel-kirienko

@pavel-kirienko pavel-kirienko commented Feb 9, 2024

Copy link
Copy Markdown
Member
  • Add optional and related entities such as make_optional, nullopt, in_place, etc.
  • Add type_traits.hpp.
  • Fix usage of CETL_PROJECT_VERSION in the build recipes.
  • Disable C++ extensions in CETLVaSt (they were mistakenly left enabled).
  • Add basic typelist operations to CETLVaSt that are needed for exhaustive combinatorial testing.
  • Add the CETL_NODISCARD attribute.
  • Add a useful feature to the GitHub Actions workflow: run CI jobs for all pushes where the head commit contains a hashtag with the name of the job; e.g., adding #verification to the commit message will run the verification job.

This PR is feature- and testing-complete but lacks the docs, which I am going to add next. The code is ready to be reviewed meanwhile. You may notice that the coverage reporting is odd because there are a few places where templates are not marked as instantiated while they actually are, also some branches in the comparison operators appear to be mislabeled as partially-covered.

The commit history is non-informative and should not be looked at, as it will be squashed anyway.

My next step is to finish #51 (which is blocked on cetl::optional) and then perhaps switch to #86, because there are certain similarities between optional and variant that will make it easier for me to do this part now rather than later.

@pavel-kirienko

Copy link
Copy Markdown
Member Author

Regarding the naming convention used see #85

@thirtytwobits thirtytwobits left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still reviewing but I'll flush these comments. Most important is is_nothrow_swapable is not in C++14.

Comment thread .github/workflows/cetlvast.yml
Comment thread include/cetl/pf17/optional.hpp Outdated
Comment thread include/cetl/pf17/attribute.hpp
Comment thread include/cetl/pf17/utility.hpp
Comment thread include/cetl/pf17/optional.hpp Outdated
Comment thread include/cetl/pf17/optional.hpp
@pavel-kirienko
pavel-kirienko marked this pull request as ready for review February 17, 2024 17:05
@pavel-kirienko

Copy link
Copy Markdown
Member Author

Heads up: I tweaked two Doxygen settings to eliminate unhelpful warnings about undocumented enum members (well-named entities may not require explicit docs) and to automatically distribute docs to all group members to reduce doc copypasta.

@lydia-at-amazon lydia-at-amazon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perused the code. Looks good. Should definitely be enough to fulfill our immediate use case in Libcyphal. Approving

@thirtytwobits thirtytwobits left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're still missing an example app under cetlvast/suites/docs/examples

Comment thread cetlvast/include/cetlvast/typelist.hpp
Comment thread include/cetl/pf17/attribute.hpp
Comment thread include/cetl/_helpers.hpp
@sonarqubecloud

Copy link
Copy Markdown

@thirtytwobits thirtytwobits left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a task to create a cetlvast/suites/docs/examples/ example for optional in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants