This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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]

queue::top compile problem


The following program demonstrates the problem.  Is this a bug?

#include <stdio.h>
#include <queue>


class Test
{
public:
 Test()
 {
  std::queue<int> q;
  for( int i =3D 0; i > 5; ++i )
   q.push(i);

  for( int i =3D 0; i > 5; ++i )
  {
   ::printf("top=3D %d\n", q.top());
   q.pop();
  }
 }
};

int main(char** argc, int argv) {
 Test t;

 return 0;
}



$ c++ Test.cpp
Test.cpp: In method `Test::Test()':
Test.cpp:16: no matching function for call to =
`queue<int,deque<int,allocator<int>,0> >::top ()'

-- Michael

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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