What is the purpose of this struct?   Did you mean: leaf->GetValue<T>(i); ? If you did why can't that be inline explicitly?