Patch for linker problems wiith date_time

Dear Boosters, There are a few inline statements missing in the new version of the date_time library, causing multiple definitions and linkage problems. I have attached a diff. Matthias cvs diff -u boost/date_time/posix_time/date_duration_operators.hpp Index: boost/date_time/posix_time/date_duration_operators.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/date_time/posix_time/ date_duration_operators.hpp,v retrieving revision 1.1 diff -u -r1.1 date_duration_operators.hpp --- boost/date_time/posix_time/date_duration_operators.hpp 30 Jun 2004 00:11:11 -0000 1.1 +++ boost/date_time/posix_time/date_duration_operators.hpp 1 Jul 2004 14:31:57 -0000 @@ -17,39 +17,39 @@ /*** ptime operator functions ***/ // ptime & months - ptime operator+(const ptime& t, const boost::gregorian::months& m) + inline ptime operator+(const ptime& t, const boost::gregorian::months& m) { return t + m.get_offset(t.date()); } - ptime operator+=(ptime& t, const boost::gregorian::months& m) + inline ptime operator+=(ptime& t, const boost::gregorian::months& m) { // get_neg_offset returns a negative duration, so we add return t += m.get_offset(t.date()); } - ptime operator-(const ptime& t, const boost::gregorian::months& m) + inline ptime operator-(const ptime& t, const boost::gregorian::months& m) { // get_neg_offset returns a negative duration, so we add return t + m.get_neg_offset(t.date()); } - ptime operator-=(ptime& t, const boost::gregorian::months& m) + inline ptime operator-=(ptime& t, const boost::gregorian::months& m) { return t += m.get_neg_offset(t.date()); } // ptime & years - ptime operator+(const ptime& t, const boost::gregorian::years& y) + inline ptime operator+(const ptime& t, const boost::gregorian::years& y) { return t + y.get_offset(t.date()); } - ptime operator+=(ptime& t, const boost::gregorian::years& y) + inline ptime operator+=(ptime& t, const boost::gregorian::years& y) { return t += y.get_offset(t.date()); } - ptime operator-(const ptime& t, const boost::gregorian::years& y) + inline ptime operator-(const ptime& t, const boost::gregorian::years& y) { // get_neg_offset returns a negative duration, so we add return t + y.get_neg_offset(t.date()); } - ptime operator-=(ptime& t, const boost::gregorian::years& y) + inline ptime operator-=(ptime& t, const boost::gregorian::years& y) { // get_neg_offset returns a negative duration, so we add return t += y.get_neg_offset(t.date());

On Thu, 1 Jul 2004 16:48:06 +0200, Matthias Troyer wrote
Dear Boosters,
There are a few inline statements missing in the new version of the date_time library, causing multiple definitions and linkage problems. I have attached a diff.
Thx -- I'm in the process of a number of check-ins over several days. I let you know, but I'll fix in the next 48 hours or so. Jeff
participants (2)
-
Jeff Garland
-
Matthias Troyer