boost header custom_time_zone.hpp triggers compile error

Bug #1277404 reported by Rudolf Leitgeb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
boost1.53 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The file /usr/include/boost/date_time/local_time/custom_time_zone.hpp shipped with that package contains the statement

      return (dst_calc_rules_); //if calc_rule is set the tz has dst

in line 67. This line will not compile with the gcc shipped with Ubuntu Saucy Salamander. An informative discussion on this topic can be found here on stackoverflow: http://stackoverflow.com/questions/15234527/boost-1-53-local-date-time-compiler-error-with-std-c0x

The fix suggested in this page does indeed work.

I would therefore suggest that Ubuntu replace that line with the correct statement:

      return bool(dst_calc_rules_); //if calc_rule is set the tz has dst

This change imposes no measurable performance or other penalty and simply makes explicit what the compiler refuses to do implicitly.

Tags: saucy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.