This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

at()


Hi,

I'm using gcc 2.95.2 on Linux 2.0.36. The following C++
program cannot be compiled.

// tmp.cc
#include <vector>

using namespace std;

int main()
{
  int a[] = {1, 2, 3};
  vector<int> v(a, a + 3);
  v.at(2);
  return 0;
}

$ g++ -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)

$ g++ tmp.cc
tmp.cc: In function `int main()':
tmp.cc:9: no matching function for call to `vector<int,allocator<int> >::at (int)'

Is that a known bug?

Best regards,
--
Taka Yoshikoshi
tyoshiko@sci.osaka-cu.ac.jp

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]