Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49940 - trunk/boost/date_time/local_time
From: Boris.Gubenko_at_[hidden]
Date: 2008-11-26 10:12:18


Author: bgubenko
Date: 2008-11-26 10:12:17 EST (Wed, 26 Nov 2008)
New Revision: 49940
URL: http://svn.boost.org/trac/boost/changeset/49940

Log:
work around the bug in aC++ (QXCR1000880488 in the HP bug tracking system)
Text files modified:
   trunk/boost/date_time/local_time/posix_time_zone.hpp | 18 ++++++++++++++++++
   1 files changed, 18 insertions(+), 0 deletions(-)

Modified: trunk/boost/date_time/local_time/posix_time_zone.hpp
==============================================================================
--- trunk/boost/date_time/local_time/posix_time_zone.hpp (original)
+++ trunk/boost/date_time/local_time/posix_time_zone.hpp 2008-11-26 10:12:17 EST (Wed, 26 Nov 2008)
@@ -89,7 +89,13 @@
       dst_offsets_(posix_time::hours(0),posix_time::hours(0),posix_time::hours(0)),
       dst_calc_rules_()
     {
+#ifdef __HP_aCC
+ // Work around bug in aC++ compiler: see QXCR1000880488 in the
+ // HP bug tracking system
+ const char_type sep_chars[2] = {',',0};
+#else
       const char_type sep_chars[2] = {','};
+#endif
       char_separator_type sep(sep_chars);
       tokenizer_type tokens(s, sep);
       tokenizer_iterator_type it = tokens.begin();
@@ -297,7 +303,13 @@
     }
 
     void calc_rules(const string_type& start, const string_type& end){
+#ifdef __HP_aCC
+ // Work around bug in aC++ compiler: see QXCR1000880488 in the
+ // HP bug tracking system
+ const char_type sep_chars[2] = {'/',0};
+#else
       const char_type sep_chars[2] = {'/'};
+#endif
       char_separator_type sep(sep_chars);
       tokenizer_type st_tok(start, sep);
       tokenizer_type et_tok(end, sep);
@@ -357,7 +369,13 @@
     void M_func(const string_type& s, const string_type& e){
       typedef gregorian::nth_kday_of_month nkday;
       unsigned short sm=0,sw=0,sd=0,em=0,ew=0,ed=0; // start/end month,week,day
+#ifdef __HP_aCC
+ // Work around bug in aC++ compiler: see QXCR1000880488 in the
+ // HP bug tracking system
+ const char_type sep_chars[3] = {'M','.',0};
+#else
       const char_type sep_chars[3] = {'M','.'};
+#endif
       char_separator_type sep(sep_chars);
       tokenizer_type stok(s, sep), etok(e, sep);
       


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk