[personal profile] aleeks
Собственно вот:
template
[Error: Irreparable invalid markup ('<class [...] t,>') in entry. Owner must fix manually. Raw contents below.]

Собственно вот:
template <class T, int N> struct MultiDimVec: std::vector<MultiDimVec<T, N-1> > { };
template <class T> struct MultiDimVec<T, 1>: std::vector<T> { };

Правда пока не придумал, как удобно задавать размер... Да и дорого выйдет, массив на основе одного блока памяти пошустрее будет, а с размерностью больше трех, пока не довелось столкнуться и думаю не доведется.

Profile

Alexandr

June 2008

S M T W T F S
12 345 67
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 22nd, 2025 04:36 pm
Powered by Dreamwidth Studios