[Boost-bugs] [Boost C++ Libraries] #8739: Compiler error in bool boost::local_time::custom_time_zone_base<CharT>::has_dst() const with C++11 mode enabled

Subject: [Boost-bugs] [Boost C++ Libraries] #8739: Compiler error in bool boost::local_time::custom_time_zone_base<CharT>::has_dst() const with C++11 mode enabled
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-27 15:21:43


#8739: Compiler error in bool
boost::local_time::custom_time_zone_base<CharT>::has_dst() const with C++11
mode enabled
------------------------------+------------------------
 Reporter: gawain.bolton@… | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 With C++11 mode enabled (the "-std=c++0x" compiler option) using GCC
 v4.6.2 and boost v1.53 there is a compile error due to the fact that
 boost::shared_ptr<>'s bool conversion operator is now "explicit".

 /export/usr/local/domdev/gbolton/local_repo/wiz/local/boost/1.53.0/include/boost/date_time/local_time/custom_time_zone.hpp:
 In member function 'bool
 boost::local_time::custom_time_zone_base<CharT>::has_dst() const [with
 CharT = char]':
 ../src/DateTime.cpp:636:1: instantiated from here
 /export/usr/local/domdev/gbolton/local_repo/wiz/local/boost/1.53.0/include/boost/date_time/local_time/custom_time_zone.hpp:67:30:
 error: cannot convert 'const
 boost::shared_ptr<boost::date_time::dst_day_calc_rule<boost::gregorian::date>
>' to 'bool' in return

 The fix is trivial and so I won't insult anyone's intelligence by
 providing it here!

 Thanks for providing such useful and good quality libraries,

 Gawain Bolton

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