This is the mail archive of the gcc@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]
Other format: [Raw text]

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


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?


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