-
Notifications
You must be signed in to change notification settings - Fork 12
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
Consolidate make_tt_tpl and make_tt #297
Conversation
We can map make_tt_tpl onto the same mechanism we use for make_tt by adding a template template parameter that signals whether arguments are passed as tuple or unpacked. Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
ttg/ttg/util/finally.h
Outdated
|
||
// final_action allows you to ensure something gets run at the end of a scope | ||
template <class F> | ||
class final_action |
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.
we might want to consider something more fully featured like https://github.com/justusc/deferral
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.
at least let's rename to match what will eventually land in C++: https://en.cppreference.com/w/cpp/experimental/scope_exit/scope_exit
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 took the implementation from https://github.com/tandasat/ScopedResource/ and slightly adopted it.
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
@evaleev I replace |
We can map
make_tt_tpl
onto the same mechanism we use formake_tt
by adding a template template parameter that signals whether arguments are passed as tuple or unpacked.This is an attempt to clean up the implementation and to open the door for device-support in
ttg::make_tt_tpl
.