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

Move use of declval into decltype. #3

Merged
merged 2 commits into from
Feb 23, 2024
Merged

Move use of declval into decltype. #3

merged 2 commits into from
Feb 23, 2024

Conversation

nickpdemarco
Copy link
Member

No description provided.

@nickpdemarco nickpdemarco marked this pull request as draft February 23, 2024 18:11
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 13.59%. Comparing base (06baff8) to head (2db590a).
Report is 2 commits behind head on main.

❗ Current head 2db590a differs from pull request most recent head dd7a22c. Consider uploading reports for the commit dd7a22c to get more accurate results

Files Patch % Lines
test/initial_draft.cpp 20.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
- Coverage   15.04%   13.59%   -1.45%     
==========================================
  Files           5        5              
  Lines         319      353      +34     
  Branches      199      213      +14     
==========================================
  Hits           48       48              
- Misses        198      233      +35     
+ Partials       73       72       -1     
Flag Coverage Δ
Linux 13.59% <20.00%> (-1.45%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

}

public:
template <class... Args>
using result_type = decltype(result_type_helper()(std::declval<Args>()...));
using result_type =
Copy link
Member Author

Choose a reason for hiding this comment

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

@sean-parent this is my best attempt at getting result_type to work, so far. If I try to use result_type_helper like this:

    template <class... Args>
    using result_type = 
      decltype(std::declval<chain>().result_type_helper()(std::declval<Args>()...));

We fail by attempting to access a member of an incomplete type. Not sure if there's a cleaner way around this.

Copy link
Member

Choose a reason for hiding this comment

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

I'm liking it! What more would you like to do on this before I push.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you're happy, I'm happy. Feel free to merge.

@nickpdemarco nickpdemarco marked this pull request as ready for review February 23, 2024 19:06
@sean-parent sean-parent merged commit c2f0c75 into main Feb 23, 2024
@nickpdemarco nickpdemarco deleted the npd/fixdeclval branch February 23, 2024 19:09
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