c++ - Invalid deque <T> subscript . Why am I getting this error? -


i getting execption error in following piece of code. suggestions on might causing ? error : invalid deque <t> subscript

typedef boost::shared_ptr<histobj> shared_hist_def;         typedef std::deque<shared_hist_def> vector_def;         typedef boost::shared_ptr<vector_def> shared_vector_def;         typedef boost::unordered_map<int,shared_vector_def> in_map_def;         typedef boost::shared_ptr<in_map_def> shared_inner_map_def;  domain::shared_hist_def& domain::getspecifichistoricaltuple(const std::string& symb,const int& tframe,const int& val) {     domain::shared_inner_map_def tshare = stat_history_base[symb];     shared_vector_def tmp = tshare->at(tframe);     try     {         domain::shared_hist_def safe_tuple =  tmp->at(val);         return safe_tuple;     }     catch (std::exception &ex)     {         std::string = ex.what();         __debugbreak();     } } 

more information:

the above method static method. , program multithreaded.any chance error occurs because multiple threads access it. had assumption think function parameters above never same @ 1 time.

your val parameter seems high (greater or equal number of elements in deque), or maybe it's negative.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -