template <int... N>
class FooImpl;
. , ,
template <int... N>
R FooFun(A...);
, , R(A...) . , A... ; , . FooFun(int, int).
, , factory , FooImpl<N...>, Foo*, FooFun
template <int... N>
Foo* FooFun();
non-constexpr (, , , ), - ).
, . ""
template <int OFFSET>
R FooDispatch(A...);
. FooDispatch. OFFSET N... . , , , . N..., FooDispatch FooFun<N...>(...).
, , Matlab ind2sub, . , , , . , , .
, ,
Foo* getFoo(int arr[N]);
,
Foo* getFoo(int* pint, int size);
; , , , .
, , , C.