calling stationary member duty c++ stl container's value_type


i'm perplexing conduct around since following doesn't work. i have std::vector i wish stationary member duty it's contained value_type so:



std::vector<vector> v;
unsigned u = v.value_type::dim();


where settlement fact typedef templated type:



template <typename t, unsigned u> category svector; 
typedef svector<double, 2> vector; //two-dimensional svector containing doubles


and stationary member duty dim() indeed inlines dimensionality u vector.



now compiler advantage an blunder summary saying:



 error: svector<double, 2u> bottom 
std::vector<svector<double, 2u>, std::allocator<svector<double, 2u> > >


which puzzles me. i reinstate apparently offending line by



unsigned u = vector::dim();


and works, nonetheless apparently dizzy hardcodes assumptions value_type v...
thanks!



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?