[Boost-bugs] [Boost C++ Libraries] #2805: Add Documentation to Date_Time to Highlight a Pitfall

Subject: [Boost-bugs] [Boost C++ Libraries] #2805: Add Documentation to Date_Time to Highlight a Pitfall
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-02-27 03:34:27


#2805: Add Documentation to Date_Time to Highlight a Pitfall
-------------------------------------------------------+--------------------
 Reporter: Charles Brockman <cmbrockman_at_[hidden]> | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: date_time
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
-------------------------------------------------------+--------------------
 A note should be added to the Date_Time documentation to warn programmers
 of a pitfall in the use of the comparison operators. Comparison of a valid
 date with not_a_date_time may return an unexpected result. In the
 expression, ''date A < date B'' if A is a valid date and B is
 ''not_a_date_time'', a Boolean true is returned. A programmer may expect
 that any comparison of valid date with ''not_a_date_time'' always returns
 false. In some cases it will return true.

 In the ''\libs\date_time\xmldoc\date_class.xml'' file in the Operator
 table of the Gregorian Date System section I suggest the following text.

 ''Warning: Some comparisons of valid dates and not_a_date_time will return
 true. See the \libs\date_time\test\gregorian\testdate.cpp program for
 illustrations of the comparisons.''

 The tests for the various comparisons are included in a patch contained in
 Trac #2804.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2805>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC