Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify auto_base with C++17 parameter pack expansion in using #194

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tomjnixon
Copy link
Member

@tomjnixon tomjnixon commented Jan 16, 2024

todo:

  • update the big comment
  • revisit VariantParameter -- perhaps this can now be implemented without the virtual base
    • no, this is still required. one possible improvement would be to flatten the list of parameters in HasParametersImpl, so that HasParameters<A, HasParameters<B, C>> (as produced by VariantParameter) is turned into HasParameters<A, B, C>, producing fewer Combine classes.
    • yeah, now that i understand how virtual inheritance works, it's obvious that it can be done with CRTP. parameter pack expansion still makes this much cleaner than would have been possible before
  • check if the visibility still makes sense now that it's possible to change it all in one place
    • no, this is required because the template wrapper functions have the same names as the tag-dispatched functions
  • try auto-detecting which methods to merge, as it may be simpler than using the Flags thing
    • no: VariantParameter uses HasParameters, so the has etc. methods are overloaded, which can't be detected without knowing the parameter types
  • check impact on binary size and build time
    • shared debug
      • any build time difference is within measurement error for me
      • .so size with debug information: 39.5MB to 38.7MB
      • .so size stripped: 3.2MB to 3.1MB

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.90%. Comparing base (3f94a9b) to head (3642d45).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
include/adm/detail/auto_base.hpp 77.77% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #194      +/-   ##
==========================================
- Coverage   89.91%   89.90%   -0.02%     
==========================================
  Files         125      125              
  Lines        5812     5816       +4     
==========================================
+ Hits         5226     5229       +3     
- Misses        586      587       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomjnixon tomjnixon force-pushed the auto_base_cpp17 branch 2 times, most recently from 42f9708 to 2ad85f0 Compare January 22, 2024 18:30
this shortens the name of some tags, from
adm::detail::ParameterTraits<...>::SomeTag to just SomeTag

in most of the places where this is used, an unused tag type was created
anyway (sometimes with the wrong name), so using that is probably
clearer
the minimum cmake version is now 3.8, which is still ancient
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.

2 participants