Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2004-07-01 09:48:06


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());


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk