#include <iostream> #include <vector> int main() { std::vector<int> v{1, 2, 3}; v.value_type x; // this line doesn't compile //v::value_type x; // nor this one }
Standard input is empty
prog.cpp: In function 'int main()':
prog.cpp:7:7: error: invalid use of 'std::vector<int>::value_type'
v.value_type x; // this line doesn't compile
^
Standard output is empty