Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Passing a tuple of systems to execute_systems() instead of a variadic param pack #16

@bjadamson

Description

@bjadamson

Hey, I got a quick question for you. I've been doing some meta programming in my game lately, and I would like to group my list of "systems" into a tuple (so I can pass it around) and then later pass that tuple to the execute_systems() function located here:

https://github.com/SuperV1234/ecst/blob/master/include/ecst/context/data/step/step.hpp#L33-L34

This doesn't work currently because I don't see a straight-forward way to destructure my std::tuple (actually I'm using hana::tuple but it's the same problem) back into a list of variadic arguments to pass to:

template <typename... TStartSystemTags>
auto execute_systems_from(TStartSystemTags... sts) noexcept;

Here's the diff of what I was thinking of as an approach:
https://github.com/bjadamson/ecst/commit/c308eea6ff897d557c53f90a8373ce26d5194d7c

Questions, do you already support this and I don't see it?
Does this seem like something that seems like a good idea to support?
How would you go about supporting this if you were the one implementing this? (I'm asking because I assume I'll have more time to work on it in the very near future, but my approach seems flawed).

Thanks as always!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions