報錯如下:no matching function for call to ‘std::vector<TYPE>::erase(__gnu_cxx::__normal_iterator<const int*, std::vector<TYPE> >&)’
v.erase(e);
原因:g++未實現這個接口,但c++11標準定義了這個接口,算編譯器bug。g++4.9.0修正。
詳情:
1、接口定義如下,參見http://www.cplusplus.com/reference/vector/vector/erase/
iterator erase (const_iterator position);
iterator erase (const_iterator first, const_iterator last);
2、bug反饋如下,參見https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54577
|
|
|