1 2 3 4 5 6 | #include <vector> class X: std::vector<int>, std::vector<char> { vector mem; //compiles OK... mem is apparently std::vector<int> }; |
I2luY2x1ZGUgPHZlY3Rvcj4KY2xhc3MgWDogc3RkOjp2ZWN0b3I8aW50Piwgc3RkOjp2ZWN0b3I8Y2hhcj4KewogICB2ZWN0b3IgbWVtOyAvL2NvbXBpbGVzIE9LLi4uIG1lbSBpcyBhcHBhcmVudGx5IHN0ZDo6dmVjdG9yPGludD4KfTsK
prog.cpp:4:4: error: reference to 'vector' is ambiguous /usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_vector.h:171:5: error: candidates are: class std::vector<char> std::vector<char>::vector /usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_vector.h:171:5: error: class std::vector<int> std::vector<int>::vector prog.cpp:4:4: error: 'vector' does not name a type
-
result: Compilation error (maybe you wish to see an example for C++11)


