Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
| 1) in DebugStream.h, make sure that 'using std::ostream' is used (and
| for other streams types we need too).
Perhaps a
#if NEED_USING_XXX
using xxx;
#endif
construct?
| 2) remove all explicit std:: for all stream types in DebugStream.[Ch]
| 3) for classes which define a << operator (commandtags...) define the
| operator wrt DebugStream instead of ostream? This would make
| definitions much cleaner
But then you cannot dump commandtags/font/etc to a regular stream
(actually _any_ ostream). So when we write an operator that writes to
an ostream we should use an ostream. We should not change this.
And to whom would the "definitions [be] much cleaner" ?
| (BTW, why does DebugStream.C include
| debug.h and not DebugStream.h?)
Because of the struct Debug, which is not LyX specific. Every
application that uses DebugStream needs to have Debug::types defined.
| Lars> plain ostream is not an option (except for very short term), it
| Lars> must be:
|
| Lars> using std::ostream; ostream a;
|
| Lars> or
|
| Lars> std::ostream a;
|
| I thought that if we used the 'old' streams (iostreams?), the classes
| were declared at toplevel. At least I think that is what DEC cxx does.
This is depricated in the C++ standard and has also nothing to do with
Cinlcudes. The old header for iostreams was <iostream.h> and the new one
is <iostream> They are not equivalent in the same way as <type.h> and
<ctype> is.
Lgb