This is a question:
Wouldn't it be nicer to include "boost/date_time/posix_time/posix_time.hpp" into the gigasecond_test.cpp as it actually needs it, instead of implicitly relying on gigasecond.h to include it. Maybe one wants to keep the header slim and thus forward declares boost::posix_time::ptime and includes the full boost header in the cpp? Additionally there is "boost/date_time/posix_time/posix_time_types.hpp" which has no i/o and would be sufficient for the implementation of advance() but then the test doesn't compile.
Please correct me if I am wrong :)
Cheers, Lukas
This is a question:
Wouldn't it be nicer to include "boost/date_time/posix_time/posix_time.hpp" into the gigasecond_test.cpp as it actually needs it, instead of implicitly relying on gigasecond.h to include it. Maybe one wants to keep the header slim and thus forward declares boost::posix_time::ptime and includes the full boost header in the cpp? Additionally there is "boost/date_time/posix_time/posix_time_types.hpp" which has no i/o and would be sufficient for the implementation of advance() but then the test doesn't compile.
Please correct me if I am wrong :)
Cheers, Lukas