#include <bits/stdc++.h>
using namespace std;
int main() {
unordered_map<char, vector<int> > before;
vector<int> tmp = {1,2,3};
// cout<<tmp[0]<<endl;
before['A'] = tmp;
cout << "done" ;
return 0;
}
如果这样用clion debug tmp[0],会报错 error: Couldn't lookup symbols: __ZNSt6vectorIiSaIiEEixEm
如果把注释行解开,则观看tmp[0]变量完全没问题。
可能debug模式做了一些编译优化吧,如果某个变量完全没有用到,就不会去编译它。