[Boost-bugs] [Boost C++ Libraries] #4845: end_of_month_day

Subject: [Boost-bugs] [Boost C++ Libraries] #4845: end_of_month_day
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-12 12:31:02


#4845: end_of_month_day
---------------------------------+------------------------------------------
 Reporter: robbie@… | Owner: matias
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Documentation
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 the last entry in section:
 http://www.boost.org/doc/libs/1_44_0/doc/html/date_time/gregorian.html#date_accessors

 is incorrect:

 {{{
 date end_of_month_day() const
 }}}

 it should read:

 {{{
 date end_of_month() const
 }}}


 supporting trials:

 {{{
 // call : $ g++ -ggdb -Wall -pedantic -Weffc++ test.cc -o test
 // compiler : g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
 // library : Boost 1.44.0

 #include <iostream> // standard io
 #include <boost/date_time/gregorian/gregorian.hpp> // may require
 -lboost_date_time

 int
 main()
 {
   namespace bg = boost::gregorian; // namespace aliases
   const bg::date feb(2000, bg::Feb, 1);
   const bg::date eom = feb.end_of_month(); // [1]
 //const bg::date eom = feb.end_of_month_day(); // [2]
   const int dom = eom.day(); // recover day-of-month
   std::cout << "day-of-month : " << dom << std::endl;
 }

 // [1] works as expected
 // [2] test.cc:21: error: 'const class boost::gregorian::date'
 // has no member named 'end_of_month_day
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4845>
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:50:04 UTC