Im a little stuck.
How would i go about getting the size of the struct inside the parameter pack loop
if i pass just the struct i get the correct size, but if i pass it by a pointer or a ref the size is always 8
struct foo_s {
int i1;
int i2;
int i3;
};
template<typename ...Args>
void Call(Args&& ...args)
{
std::size_t index = 0;
auto process = [&] <typename Arg> (Arg && arg, std::size_t index) {
std::size_t size = sizeof(Arg); // always 8
};
(process(std::forward<Args>(args), index++), ...);
}
int main() {
foo_s foo = { 1, 2, 3 };
foo_s* pFoo = &foo;
Call(pFoo);
}