Closed Nielsbishere closed 5 years ago
My solution to this was just:
template<class ...Ts>
std::vector<std::reference_wrapper<const std::type_info>> Deps() {
return { (typeid(Ts))...};
}
Yeah that's way cleaner, I didn't know this was a way of calling functions with variadic arguments. Only used sizeof...() before; which is different.
Is your request related to a problem? Please describe. FG_DEPS doesn't allow infinite expansion (only up to 6 dependencies) and requires the end-user to specify number of dependencies; which is redundant if using templates instead.
Describe the solution you'd like
where fg_dep:
Describe alternatives you've considered Additional context N.A.