-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
test/initial_draft.cpp
Outdated
} | ||
|
||
public: | ||
template <class... Args> | ||
using result_type = decltype(result_type_helper()(std::declval<Args>()...)); | ||
using result_type = |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.