From: Krzysztof K. <twe...@gm...> - 2014-02-10 08:46:46
|
2014-02-09 22:44 GMT+01:00 Vinícius dos Santos Oliveira <vin...@gm...>: > > Em Dom, 2014-02-09 às 17:02 +0100, Johan Engelen escreveu: > > Should we separate all the iostream output functions into a separate file that people can then optionally include? I somewhat agree with not "tainting" the code to force including <iostream>... > > > It's better than code that can break depending on the include order. > > Do it. :) +1 I would also think for a bit whether there is a way to avoid including every 2Geom header in this new separate file (e.g. so that it defines operators only for things which are already included). We could do this by adding one include guard per operator, e.g. like this: #ifndef SEEN_LIB2GEOM_POINT_OUTPUT #ifdef SEEN_LIB2GEOM_POINT_H #define SEEN_LIB2GEOM_POINT_OUTPUT ... operator<< definition ... #endif #endif This would still require including the new file at the end of all 2Geom includes in a given .h or .cpp file. Regards, Krzysztof |