Index: time_duration.hpp =================================================================== --- time_duration.hpp (revision 77806) +++ time_duration.hpp (working copy) @@ -2,7 +2,7 @@ #define DATE_TIME_TIME_DURATION_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst @@ -179,7 +179,7 @@ return duration_type(ticks_); } //! Division operations on a duration with an integer. - duration_type operator/=(int divisor) + duration_type operator/=(int divisor) { ticks_ = ticks_ / divisor; return duration_type(ticks_); @@ -251,7 +251,7 @@ } protected: - explicit time_duration(impl_type in) : ticks_(in) {}; + explicit time_duration(impl_type in) : ticks_(in) {} impl_type ticks_; }; Index: dst_rules.hpp =================================================================== --- dst_rules.hpp (revision 77806) +++ dst_rules.hpp (working copy) @@ -371,7 +371,7 @@ return is_not_in_dst; } - static bool is_dst_boundary_day(date_type d) + static bool is_dst_boundary_day(date_type ) { return false; } Index: period_formatter.hpp =================================================================== --- period_formatter.hpp (revision 77806) +++ period_formatter.hpp (working copy) @@ -114,10 +114,10 @@ { m_range_option = option; } - void delimiter_strings(const string_type& separator, - const string_type& start_delim, - const string_type& open_end_delim, - const string_type& closed_end_delim) + void delimiter_strings(const string_type& , + const string_type& , + const string_type& , + const string_type& ) { m_period_separator; m_period_start_delimeter; Index: date_generators.hpp =================================================================== --- date_generators.hpp (revision 77806) +++ date_generators.hpp (working copy) @@ -2,10 +2,10 @@ #define DATE_TIME_DATE_GENERATORS_HPP__ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - * Author: Jeff Garland, Bart Garst + * Author: Jeff Garland, Bart Garst * $Date$ */ @@ -34,16 +34,16 @@ public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::year_type year_type; - year_based_generator() {}; - virtual ~year_based_generator() {}; + year_based_generator() {} + virtual ~year_based_generator() {} virtual date_type get_date(year_type y) const = 0; //! Returns a string for use in a POSIX time_zone string virtual std::string to_string() const =0; }; - + //! Generates a date by applying the year to the given month and day. /*! - Example usage: + Example usage: @code partial_date pd(1, Jan); partial_date pd2(70); @@ -123,9 +123,9 @@ //months are equal return (day_ < rhs.day_); } - + // added for streaming purposes - month_type month() const + month_type month() const { return month_; } @@ -135,15 +135,15 @@ } //! Returns string suitable for use in POSIX time zone string - /*! Returns string formatted with up to 3 digits: - * Jan-01 == "0" + /*! Returns string formatted with up to 3 digits: + * Jan-01 == "0" * Feb-29 == "58" * Dec-31 == "365" */ virtual std::string to_string() const { std::ostringstream ss; date_type d(2004, month_, day_); - unsigned short c = d.day_of_year(); + unsigned short c = d.day_of_year(); c--; // numbered 0-365 while day_of_year is 1 based... ss << c; return ss.str(); @@ -161,7 +161,7 @@ /*! Based on the idea in Cal. Calc. for finding holidays that are * the 'first Monday of September'. When instantiated with * 'fifth' kday of month, the result will be the last kday of month - * which can be the fourth or fifth depending on the structure of + * which can be the fourth or fifth depending on the structure of * the month. * * The algorithm here basically guesses for the first @@ -169,8 +169,8 @@ * type. That is, if the first of the month is a Tuesday * and it needs Wenesday then we simply increment by a day * and then we can add the length of a week until we get - * to the 'nth kday'. There are probably more efficient - * algorithms based on using a mod 7, but this one works + * to the 'nth kday'. There are probably more efficient + * algorithms based on using a mod 7, but this one works * reasonably well for basic applications. * \ingroup date_alg */ @@ -233,7 +233,7 @@ virtual std::string to_string() const { std::ostringstream ss; - ss << 'M' + ss << 'M' << static_cast(month_) << '.' << static_cast(wn_) << '.' << static_cast(dow_); @@ -244,7 +244,7 @@ week_num wn_; day_of_week_type dow_; }; - + //! Useful generator functor for finding holidays and daylight savings /*! Similar to nth_kday_of_month, but requires less paramters * \ingroup date_alg @@ -290,7 +290,7 @@ virtual std::string to_string() const { std::ostringstream ss; - ss << 'M' + ss << 'M' << static_cast(month_) << '.' << 1 << '.' << static_cast(dow_); @@ -300,9 +300,9 @@ month_type month_; day_of_week_type dow_; }; - - - + + + //! Calculate something like Last Sunday of January /*! Useful generator functor for finding holidays and daylight savings * Get the last day of the month and then calculate the difference @@ -351,7 +351,7 @@ virtual std::string to_string() const { std::ostringstream ss; - ss << 'M' + ss << 'M' << static_cast(month_) << '.' << 5 << '.' << static_cast(dow_); @@ -361,8 +361,8 @@ month_type month_; day_of_week_type dow_; }; - - + + //! Calculate something like "First Sunday after Jan 1,2002 /*! Date generator that takes a date and finds kday after *@code @@ -400,7 +400,7 @@ private: day_of_week_type dow_; }; - + //! Calculate something like "First Sunday before Jan 1,2002 /*! Date generator that takes a date and finds kday after *@code @@ -438,10 +438,10 @@ private: day_of_week_type dow_; }; - + //! Calculates the number of days until the next weekday /*! Calculates the number of days until the next weekday. - * If the date given falls on a Sunday and the given weekday + * If the date given falls on a Sunday and the given weekday * is Tuesday the result will be 2 days */ template inline @@ -458,8 +458,8 @@ //! Calculates the number of days since the previous weekday /*! Calculates the number of days since the previous weekday - * If the date given falls on a Sunday and the given weekday - * is Tuesday the result will be 5 days. The answer will be a positive + * If the date given falls on a Sunday and the given weekday + * is Tuesday the result will be 5 days. The answer will be a positive * number because Tuesday is 5 days before Sunday, not -5 days before. */ template inline @@ -477,9 +477,9 @@ } //! Generates a date object representing the date of the following weekday from the given date - /*! Generates a date object representing the date of the following - * weekday from the given date. If the date given is 2004-May-9 - * (a Sunday) and the given weekday is Tuesday then the resulting date + /*! Generates a date object representing the date of the following + * weekday from the given date. If the date given is 2004-May-9 + * (a Sunday) and the given weekday is Tuesday then the resulting date * will be 2004-May-11. */ template inline @@ -489,9 +489,9 @@ } //! Generates a date object representing the date of the previous weekday from the given date - /*! Generates a date object representing the date of the previous - * weekday from the given date. If the date given is 2004-May-9 - * (a Sunday) and the given weekday is Tuesday then the resulting date + /*! Generates a date object representing the date of the previous + * weekday from the given date. If the date given is 2004-May-9 + * (a Sunday) and the given weekday is Tuesday then the resulting date * will be 2004-May-4. */ template inline Index: date.hpp =================================================================== --- date.hpp (revision 77806) +++ date.hpp (working copy) @@ -191,8 +191,8 @@ dates. It is not exposed to users since that would require class users to understand the inner workings of the date class. */ - explicit date(date_int_type days) : days_(days) {}; - explicit date(date_rep_type days) : days_(days.as_number()) {}; + explicit date(date_int_type days) : days_(days) {} + explicit date(date_rep_type days) : days_(days.as_number()) {} date_int_type days_; }; Index: local_time/posix_time_zone.hpp =================================================================== --- local_time/posix_time_zone.hpp (revision 77806) +++ local_time/posix_time_zone.hpp (working copy) @@ -115,7 +115,7 @@ calc_rules(dst_begin, dst_end); } } - virtual ~posix_time_zone_base() {}; + virtual ~posix_time_zone_base() {} //!String for the zone when not in daylight savings (eg: EST) virtual string_type std_zone_abbrev()const { Index: local_time/custom_time_zone.hpp =================================================================== --- local_time/custom_time_zone.hpp (revision 77806) +++ local_time/custom_time_zone.hpp (working copy) @@ -2,7 +2,7 @@ #define LOCAL_TIME_CUSTOM_TIME_ZONE_HPP__ /* Copyright (c) 2003-2005 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date$ @@ -34,8 +34,8 @@ typedef typename base_type::stringstream_type stringstream_type; typedef date_time::time_zone_names_base time_zone_names; typedef CharT char_type; - - custom_time_zone_base(const time_zone_names& zone_names, + + custom_time_zone_base(const time_zone_names& zone_names, const time_duration_type& utc_offset, const dst_adjustment_offsets& dst_shift, boost::shared_ptr calc_rule) : @@ -43,8 +43,8 @@ base_utc_offset_(utc_offset), dst_offsets_(dst_shift), dst_calc_rules_(calc_rule) - {}; - virtual ~custom_time_zone_base() {}; + {} + virtual ~custom_time_zone_base() {} virtual string_type dst_zone_abbrev() const { return zone_names_.dst_zone_abbrev(); Index: local_time/local_date_time.hpp =================================================================== --- local_time/local_date_time.hpp (revision 77806) +++ local_time/local_date_time.hpp (working copy) @@ -208,7 +208,7 @@ } //! Simple destructor, releases time zone if last referrer - ~local_date_time_base() {}; + ~local_date_time_base() {} //! Copy constructor local_date_time_base(const local_date_time_base& rhs) : Index: time_zone_base.hpp =================================================================== --- time_zone_base.hpp (revision 77806) +++ time_zone_base.hpp (working copy) @@ -2,7 +2,7 @@ #define _DATE_TIME_TIME_ZONE_BASE__ /* Copyright (c) 2003-2005 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date$ @@ -26,9 +26,9 @@ * would be to convert from POSIX timezone strings. Regardless of * the construction technique, this is the interface that these * time zone types must provide. - * + * * Note that this class is intended to be used as a shared - * resource (hence the derivation from boost::counted_base. + * resource (hence the derivation from boost::counted_base. */ template class time_zone_base { @@ -39,8 +39,8 @@ typedef typename time_type::date_type::year_type year_type; typedef typename time_type::time_duration_type time_duration_type; - time_zone_base() {}; - virtual ~time_zone_base() {}; + time_zone_base() {} + virtual ~time_zone_base() {} //!String for the timezone when in daylight savings (eg: EDT) virtual string_type dst_zone_abbrev() const=0; //!String for the zone when not in daylight savings (eg: EST) @@ -61,9 +61,9 @@ virtual time_duration_type dst_offset() const=0; //! Returns a POSIX time_zone string for this object virtual string_type to_posix_string() const =0; - + private: - + }; @@ -82,7 +82,7 @@ dst_start_offset_(dst_start_offset), dst_end_offset_(dst_end_offset) {} - + //! Amount DST adjusts the clock eg: plus one hour time_duration_type dst_adjust_; //! Time past midnight on start transition day that dst starts Index: date_iterator.hpp =================================================================== --- date_iterator.hpp (revision 77806) +++ date_iterator.hpp (working copy) @@ -2,7 +2,7 @@ #define DATE_ITERATOR_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst @@ -32,7 +32,7 @@ template class date_itr_base { // works, but benefit unclear at the moment - // class date_itr_base : public std::iterator{ public: typedef typename date_type::duration_type duration_type; @@ -40,31 +40,31 @@ typedef std::input_iterator_tag iterator_category; date_itr_base(date_type d) : current_(d) {} - virtual ~date_itr_base() {}; - date_itr_base& operator++() + virtual ~date_itr_base() {} + date_itr_base& operator++() { current_ = current_ + get_offset(current_); return *this; } - date_itr_base& operator--() + date_itr_base& operator--() { current_ = current_ + get_neg_offset(current_); return *this; } virtual duration_type get_offset(const date_type& current) const=0; virtual duration_type get_neg_offset(const date_type& current) const=0; - date_type operator*() {return current_;}; - date_type* operator->() {return ¤t_;}; + date_type operator*() {return current_;} + date_type* operator->() {return ¤t_;} bool operator< (const date_type& d) {return current_ < d;} bool operator<= (const date_type& d) {return current_ <= d;} bool operator> (const date_type& d) {return current_ > d;} bool operator>= (const date_type& d) {return current_ >= d;} bool operator== (const date_type& d) {return current_ == d;} - bool operator!= (const date_type& d) {return current_ != d;} + bool operator!= (const date_type& d) {return current_ != d;} private: date_type current_; }; - + //! Overrides the base date iterator providing hook for functors /* * offset_functor @@ -77,9 +77,9 @@ class date_itr : public date_itr_base { public: typedef typename date_type::duration_type duration_type; - date_itr(date_type d, int factor=1) : - date_itr_base(d), - of_(factor) + date_itr(date_type d, int factor=1) : + date_itr_base(d), + of_(factor) {} private: virtual duration_type get_offset(const date_type& current) const @@ -92,9 +92,9 @@ } offset_functor of_; }; - - + + } } //namespace date_time Index: date_names_put.hpp =================================================================== --- date_names_put.hpp (revision 77806) +++ date_names_put.hpp (working copy) @@ -2,10 +2,10 @@ #define DATE_TIME_DATE_NAMES_PUT_HPP___ /* Copyright (c) 2002-2005 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - * Author: Jeff Garland, Bart Garst + * Author: Jeff Garland, Bart Garst * $Date$ */ @@ -27,22 +27,22 @@ //! Output facet base class for gregorian dates. /*! This class is a base class for date facets used to localize the * names of months and the names of days in the week. - * + * * Requirements of Config - * - define an enumeration month_enum that enumerates the months. + * - define an enumeration month_enum that enumerates the months. * The enumeration should be '1' based eg: Jan==1 * - define as_short_string and as_long_string * * (see langer & kreft p334). - * + * */ template > class date_names_put : public std::locale::facet { public: - date_names_put() {}; + date_names_put() {} typedef OutputIterator iter_type; typedef typename Config::month_type month_type; typedef typename Config::month_enum month_enum; @@ -118,7 +118,7 @@ put_string(oitr, gm.as_short_string(c)); } //! Default facet implementation uses month_type defaults - virtual void do_put_month_long(iter_type& oitr, + virtual void do_put_month_long(iter_type& oitr, month_enum moy) const { month_type gm(moy); @@ -160,7 +160,7 @@ string_type s(separator); //put in '-' put_string(oitr, s); } - //! Default for date order + //! Default for date order virtual ymd_order_spec do_date_order() const { return ymd_order_iso; @@ -186,27 +186,27 @@ } } }; - + template - const typename date_names_put::char_type - date_names_put::default_special_value_names[3][17] = { + const typename date_names_put::char_type + date_names_put::default_special_value_names[3][17] = { {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'}, {'-','i','n','f','i','n','i','t','y'}, {'+','i','n','f','i','n','i','t','y'} }; template - const typename date_names_put::char_type - date_names_put::separator[2] = + const typename date_names_put::char_type + date_names_put::separator[2] = {'-', '\0'} ; - - //! Generate storage location for a std::locale::id + + //! Generate storage location for a std::locale::id template std::locale::id date_names_put::id; //! A date name output facet that takes an array of char* to define strings template > class all_date_names_put : public date_names_put { @@ -230,29 +230,29 @@ separator_char_[0] = separator_char; separator_char_[1] = '\0'; - }; + } typedef OutputIterator iter_type; typedef typename Config::month_enum month_enum; typedef typename Config::weekday_enum weekday_enum; typedef typename Config::special_value_enum special_value_enum; - const charT* const* get_short_month_names() const + const charT* const* get_short_month_names() const { return month_short_names_; } - const charT* const* get_long_month_names() const + const charT* const* get_long_month_names() const { return month_long_names_; } - const charT* const* get_special_value_names() const + const charT* const* get_special_value_names() const { return special_value_names_; } - const charT* const* get_short_weekday_names()const + const charT* const* get_short_weekday_names()const { return weekday_short_names_; } - const charT* const* get_long_weekday_names()const + const charT* const* get_long_weekday_names()const { return weekday_long_names_; } @@ -263,7 +263,7 @@ { this->put_string(oitr, month_short_names_[moy-1]); } - //! Long month names + //! Long month names virtual void do_put_month_long(iter_type& oitr, month_enum moy) const { this->put_string(oitr, month_long_names_[moy-1]); @@ -310,7 +310,7 @@ const charT* const* weekday_long_names_; charT separator_char_[2]; ymd_order_spec order_spec_; - month_format_spec month_format_spec_; + month_format_spec month_format_spec_; }; } } //namespace boost::date_time Index: dst_transition_generators.hpp =================================================================== --- dst_transition_generators.hpp (revision 77806) +++ dst_transition_generators.hpp (working copy) @@ -18,7 +18,7 @@ { public: typedef typename date_type::year_type year_type; - virtual ~dst_day_calc_rule() {}; + virtual ~dst_day_calc_rule() {} virtual date_type start_day(year_type y) const=0; virtual std::string start_rule_as_string() const=0; virtual date_type end_day(year_type y) const=0; Index: wrapping_int.hpp =================================================================== --- wrapping_int.hpp (revision 77806) +++ wrapping_int.hpp (working copy) @@ -2,7 +2,7 @@ #define _DATE_TIME_WRAPPING_INT_HPP__ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst @@ -16,15 +16,15 @@ //! A wrapping integer used to support time durations (WARNING: only instantiate with a signed type) /*! In composite date and time types this type is used to * wrap at the day boundary. - * Ex: - * A wrapping_int will roll over after nine, and + * Ex: + * A wrapping_int will roll over after nine, and * roll under below zero. This gives a range of [0,9] * - * NOTE: it is strongly recommended that wrapping_int2 be used - * instead of wrapping_int as wrapping_int is to be depricated + * NOTE: it is strongly recommended that wrapping_int2 be used + * instead of wrapping_int as wrapping_int is to be depricated * at some point soon. * - * Also Note that warnings will occur if instantiated with an + * Also Note that warnings will occur if instantiated with an * unsigned type. Only a signed type should be used! */ template @@ -34,17 +34,17 @@ //typedef overflow_type_ overflow_type; static int_type wrap_value() {return wrap_val;} //!Add, return true if wrapped - wrapping_int(int_type v) : value_(v) {}; + wrapping_int(int_type v) : value_(v) {} //! Explicit converion method int_type as_int() const {return value_;} operator int_type() const {return value_;} //!Add, return number of wraps performed - /*! The sign of the returned value will indicate which direction the + /*! The sign of the returned value will indicate which direction the * wraps went. Ex: add a negative number and wrapping under could occur, - * this would be indicated by a negative return value. If wrapping over + * this would be indicated by a negative return value. If wrapping over * took place, a positive value would be returned */ template< typename IntT > - IntT add(IntT v) + IntT add(IntT v) { int_type remainder = static_cast(v % (wrap_val)); IntT overflow = static_cast(v / (wrap_val)); @@ -53,12 +53,12 @@ } //! Subtract will return '+d' if wrapping under took place ('d' is the number of wraps) /*! The sign of the returned value will indicate which direction the - * wraps went (positive indicates wrap under, negative indicates wrap over). - * Ex: subtract a negative number and wrapping over could - * occur, this would be indicated by a negative return value. If + * wraps went (positive indicates wrap under, negative indicates wrap over). + * Ex: subtract a negative number and wrapping over could + * occur, this would be indicated by a negative return value. If * wrapping under took place, a positive value would be returned. */ template< typename IntT > - IntT subtract(IntT v) + IntT subtract(IntT v) { int_type remainder = static_cast(v % (wrap_val)); IntT underflow = static_cast(-(v / (wrap_val))); @@ -71,19 +71,19 @@ template< typename IntT > IntT calculate_wrap(IntT wrap) { - if ((value_) >= wrap_val) + if ((value_) >= wrap_val) { ++wrap; value_ -= (wrap_val); } - else if(value_ < 0) + else if(value_ < 0) { --wrap; value_ += (wrap_val); } return wrap; } - + }; @@ -113,12 +113,12 @@ int_type as_int() const {return value_;} operator int_type() const {return value_;} //!Add, return number of wraps performed - /*! The sign of the returned value will indicate which direction the + /*! The sign of the returned value will indicate which direction the * wraps went. Ex: add a negative number and wrapping under could occur, - * this would be indicated by a negative return value. If wrapping over + * this would be indicated by a negative return value. If wrapping over * took place, a positive value would be returned */ template< typename IntT > - IntT add(IntT v) + IntT add(IntT v) { int_type remainder = static_cast(v % (wrap_max - wrap_min + 1)); IntT overflow = static_cast(v / (wrap_max - wrap_min + 1)); @@ -127,30 +127,30 @@ } //! Subtract will return '-d' if wrapping under took place ('d' is the number of wraps) /*! The sign of the returned value will indicate which direction the - * wraps went. Ex: subtract a negative number and wrapping over could - * occur, this would be indicated by a positive return value. If + * wraps went. Ex: subtract a negative number and wrapping over could + * occur, this would be indicated by a positive return value. If * wrapping under took place, a negative value would be returned */ template< typename IntT > - IntT subtract(IntT v) + IntT subtract(IntT v) { int_type remainder = static_cast(v % (wrap_max - wrap_min + 1)); IntT underflow = static_cast(-(v / (wrap_max - wrap_min + 1))); value_ = static_cast(value_ - remainder); return calculate_wrap(underflow); } - + private: int_type value_; template< typename IntT > IntT calculate_wrap(IntT wrap) { - if ((value_) > wrap_max) + if ((value_) > wrap_max) { ++wrap; value_ -= (wrap_max - wrap_min + 1); } - else if((value_) < wrap_min) + else if((value_) < wrap_min) { --wrap; value_ += (wrap_max - wrap_min + 1); Index: time_iterator.hpp =================================================================== --- time_iterator.hpp (revision 77806) +++ time_iterator.hpp (working copy) @@ -2,7 +2,7 @@ #define DATE_TIME_TIME_ITERATOR_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst @@ -12,40 +12,40 @@ namespace boost { namespace date_time { - + //! Simple time iterator skeleton class template class time_itr { public: typedef typename time_type::time_duration_type time_duration_type; - time_itr(time_type t, time_duration_type d) : current_(t), offset_(d) {}; - time_itr& operator++() + time_itr(time_type t, time_duration_type d) : current_(t), offset_(d) {} + time_itr& operator++() { current_ = current_ + offset_; return *this; } - time_itr& operator--() + time_itr& operator--() { current_ = current_ - offset_; return *this; } - time_type operator*() {return current_;}; - time_type* operator->() {return ¤t_;}; - bool operator< (const time_type& t) {return current_ < t;}; - bool operator<= (const time_type& t) {return current_ <= t;}; - bool operator!= (const time_type& t) {return current_ != t;}; - bool operator== (const time_type& t) {return current_ == t;}; - bool operator> (const time_type& t) {return current_ > t;}; - bool operator>= (const time_type& t) {return current_ >= t;}; - + time_type operator*() {return current_;} + time_type* operator->() {return ¤t_;} + bool operator< (const time_type& t) {return current_ < t;} + bool operator<= (const time_type& t) {return current_ <= t;} + bool operator!= (const time_type& t) {return current_ != t;} + bool operator== (const time_type& t) {return current_ == t;} + bool operator> (const time_type& t) {return current_ > t;} + bool operator>= (const time_type& t) {return current_ >= t;} + private: time_type current_; time_duration_type offset_; }; - - + + } }//namespace date_time Index: date_duration.hpp =================================================================== --- date_duration.hpp (revision 77806) +++ date_duration.hpp (working copy) @@ -2,7 +2,7 @@ #define DATE_TIME_DATE_DURATION__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst @@ -26,14 +26,14 @@ , boost::subtractable1< date_duration< duration_rep_traits > , boost::dividable2< date_duration< duration_rep_traits >, int > > > > > - { + { public: typedef typename duration_rep_traits::int_type duration_rep_type; typedef typename duration_rep_traits::impl_type duration_rep; - + //! Construct from a day count - explicit date_duration(duration_rep day_count) : days_(day_count) {}; - + explicit date_duration(duration_rep day_count) : days_(day_count) {} + /*! construct from special_values - only works when * instantiated with duration_traits_adapted */ date_duration(special_values sv) : @@ -125,7 +125,7 @@ { typedef long int_type; typedef long impl_type; - static int_type as_number(impl_type i) { return i; }; + static int_type as_number(impl_type i) { return i; } }; /*! Struct for instantiating date_duration WITH special values @@ -135,10 +135,10 @@ { typedef long int_type; typedef boost::date_time::int_adapter impl_type; - static int_type as_number(impl_type i) { return i.as_number(); }; + static int_type as_number(impl_type i) { return i.as_number(); } }; - + } } //namspace date_time