-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from stephenswat/feat/parameter_pack_for
Add `make_parameter_pack_for` utility function
- Loading branch information
Showing
3 changed files
with
401 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if __name__ == "__main__": | ||
for n in range(1, 11): | ||
print(f"template <typename F, std::enable_if_t<utility::backend_depth<typename F::backend_t>::value == {n}, bool> = true> auto make_parameter_pack_for(") | ||
print(",".join(f"typename utility::nth_backend<typename F::backend_t, {i}>::type::configuration_t && a{i}" for i in range(n))) | ||
print(") { return make_parameter_pack(") | ||
print(",".join(f"std::forward<typename utility::nth_backend<typename F::backend_t, {i}>::type::configuration_t>(a{i})" for i in range(n))) | ||
print(");}") | ||
print() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.