Boost logo

Boost :

From: Christopher Currie (christopher_at_[hidden])
Date: 2003-10-22 14:54:55


Attached is a patch to the newly added get_month_map_ptr(). This
function will not compile on Sun CC, due to the fact that it is unable
to convert:

        std::pair<std::string, int>
to

        std::pair<std::string, unsigned short>

This may be due to Sun CC's own problems, but date_time is one of the
few libraries that hasn't had problems on the Sun platform and I'd like
to keep it that way. The patch is trivial, and shouldn't affect other
platforms.

Thanks,
Christopher

Index: greg_month.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/date_time/src/gregorian/greg_month.cpp,v
retrieving revision 1.4
diff -u -r1.4 greg_month.cpp
--- greg_month.cpp 19 Oct 2003 19:56:26 -0000 1.4
+++ greg_month.cpp 22 Oct 2003 19:50:47 -0000
@@ -31,7 +31,7 @@

      if(month_map_ptr->empty()) {
        std::string s("");
- for(int i = 1; i <= 12; ++i) {
+ for(unsigned short i = 1; i <= 12; ++i) {
          greg_month m(static_cast<month_enum>(i));
          s = m.as_long_string();
  #if defined(BOOST_DATE_TIME_NO_STD_TRANSFORM)


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