#include<iostream>#include<cstdlib>#include<vector>usingnamespacestd;intmain(){vector<int>v={};//1,3,4};if(v.size()!=1){if(v.empty())cerr<<"V is empty"<<endl;elsecerr<<"V is bigger than one"<<endl;}}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The following code generates a dead-code block error when running with --enable=all.
Checked against commit 87e7b57170a82a601e7c8289c75acf26b46a40d9
This one still reproduces with v2.3.
Apparently, this has been fixed in the meantime. Head gives the correct warnings
It also correctly handles the case
v = {1,3,4};
.