José Abílio Oliveira Matos <[EMAIL PROTECTED]> writes: | On Wednesday 24 July 2002 11:59, Lars Gullik Bjønnes wrote: >> José Abílio Oliveira Matos <[EMAIL PROTECTED]> writes: >> | So if define MODERN_STL_STREAM and include iostream that file compiles >> | cleanly. > | As I supected after the last message the problem regarding the test for | modern stl stream is that it should appear #include <iostream> and not just | #include <fstream>, that is the fix present in 1.3 and I think it makes | sense. > >> | It remains the problem in vspace... >> >> Show me again please. | g++3 -DHAVE_CONFIG_H -I. -I. -I. -I../images -I/usr/X11R6/include -g -O2 | -fno-exceptions -fno-rtti -c vspace.C | /usr/include/g++-v3/bits/stl_iterator_base_types.h: In instantiation of | `std::iterator_traits<std::basic_string<char, std::char_traits<char>, | std::allocator<char> > >': | /usr/include/g++-v3/bits/stl_iterator_base_funcs.h:171: instantiated from | `void std::advance(_InputIterator&, _Distance) [with _InputIterator = | std::basic_string<char, std::char_traits<char>, std::allocator<char> >, | _Distance = int]' | vspace.C:76: instantiated from here | /usr/include/g++-v3/bits/stl_iterator_base_types.h:140: no type named | `iterator_category' in `class std::basic_string<char, | std::char_traits<char>, std::allocator<char> >' | /usr/include/g++-v3/bits/stl_iterator_base_funcs.h: In function `void | std::advance(_InputIterator&, _Distance) [with _InputIterator = | std::basic_string<char, std::char_traits<char>, std::allocator<char> >, | _Distance = int]': | vspace.C:76: instantiated from here | /usr/include/g++-v3/bits/stl_iterator_base_funcs.h:171: no matching function | for call to `iterator_category(std::basic_string<char, | std::char_traits<char>, std::allocator<char> >&)' > | The relevant lines are: | 60 static inline void advance (string & data, unsigned int n) | 61 { | 62 data.erase(0, n); | 63 } | 64 | 65 static inline bool isEndOfData (string const & data) | 66 { | 67 return frontStrip (data).empty(); | 68 } | 69 | 70 static char nextToken (string & data) | 71 { | 72 data = frontStrip(data); | 73 if (data.empty()) | 74 return '\0'; | 75 else if (data[0] == '+') { | 76 advance (data, 1);
It looks like the compiler thinks that this is std::advance, then it really is the advance at line 60. It seems that the fix was to rename the advance to lyx_advance, that is what is in vspace.C now. -- Lgb