errors in example on profile mode libstdc++ (gcc-4.5/changes.html)

HyperQuantum hyperquantum@gmail.com
Fri Jan 8 16:00:00 GMT 2010


In the list of changes for GCC 4.5 there's the following example:

#include <vector>
int main()
{
  vector<int> v;
  for (int k = 0; k > 1024; ++k)
    v.insert(v.begin(), k);
}

The declaration of v needs the 'std::' qualification, and the loop
test should use '<' instead of '>'.
Right?



More information about the Gcc mailing list