Xref: news2.mv.net comp.os.msdos.djgpp:7230 From: Wolfram Brenig Newsgroups: comp.os.msdos.djgpp Subject: HELP!: STL's deque & rotate problem!! Date: 13 Aug 1996 15:07:29 GMT Organization: Institute of Theoretical Physics, University of Cologne, Germany Lines: 57 Message-ID: <4uq5nh$ale@news.rrz.uni-koeln.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, (2nd try ... c'mon you DJGPP gurus ...) anybody out there who would like to help me with the following problem I have with DJGPP's STL-lib. I have to apply STL's generic 'rotate' algorithm to a class deque. Up until today I thought there should be no problem with the code caricature below (or at least I did not experience any problems using similar things on other compilers). #include #include #include int main() { //vector v; deque v; v.push_back('a'); v.push_back('b'); //not a long one...but sufficient rotate(v.begin(),v.begin()+1,v.end()); return EXIT_SUCCESS; } However, when I compile this using: gcc -g foo.cc -lstdcxx, my DJGPP compiler talks to me strangely: c:/djgpp/lang/cxx/algo.h: In function `void rotate(class deque:: iterator, class deque::iterator, class deque::iterator)': c:/djgpp/lang/cxx/algo.h:520: type unification failed for function template `template Distance * distance_type (input_iterator<...> &)' c:/djgpp/lang/cxx/algo.h:521: type unification failed for function template `template struct input_iterator_tag iterator_category(input_iterator<...> &)' Let alone, that I dont have any clue what this friendly message is about, even more strangely, if I replace deque by vector, as shown in the commented lines, everything works perfect ???? My STL reference keeps telling me that this must not happen.... What's wrong here ???? Any help is most appreciated. Mailing your comments directly to me would be very kind of you. Thanks :-) ________________________________________________________________________ Wolfram Brenig | Tel: +49-(0)-221-470-4309 (office) Universitaet zu Koeln | -3479 (secr.) Institut fuer Theoretische Physik | Zuelpicher Str. 77 | FAX: +49-(0)-221-470-5159 50937 Koeln | Email: brenig AT thp DOT uni-koeln DOT de GERMANY |