A
Alex Vinokur
------ foo.cpp ------
#include <vector>
using namespace std;
int main()
{
const vector<int> v1 (10);
const vector<bool> v2 (10);
&v1[0];
&v2[0]; // Line#10
return 0;
}
---------------------
--- Compilation ---
// g++ 3.3.3
$ g++ -W -Wall foo.cpp
foo.cpp: In function `int main()':
foo.cpp:10: error: non-lvalue in unary `&'
#include <vector>
using namespace std;
int main()
{
const vector<int> v1 (10);
const vector<bool> v2 (10);
&v1[0];
&v2[0]; // Line#10
return 0;
}
---------------------
--- Compilation ---
// g++ 3.3.3
$ g++ -W -Wall foo.cpp
foo.cpp: In function `int main()':
foo.cpp:10: error: non-lvalue in unary `&'