On Monday 07 January 2002 1:26 pm, you wrote: > | Note that box.h contians the following inlined function: > > > | inline std::ostream & operator<<(std::ostream & o, Box & b) > | { > | return o << "x1,y1: " << b.x1 << "," << b.y1 > | << " x2,y2: " << b.x2 << "," << b.y2 << std::endl; > | } > > > | Does that mean that I should #include "support/LOstream.h" in box.h or in > | BufferView.C? > > Do you really need this to be inlined? > > and .h files should be selfcontaining (imho), so if you cannot move > this code out of line (you probably should) then LOstream should be > included in the .h file. Of course when not inlining you only need > forward references to ostream and that is done with <iosfwd>.
Good. I have a nice rule to add to my list of coding rules. Thank you! As for moving this function out of line, this isn't my code. I was just trying to get cvs to compile after two weeks away from a computer! I'm happy to create a new file box.C if you want me to, but it seems a little like overkill... Angus