Re: [Boost-bugs] [Boost C++ Libraries] #4636: Run-Time Check Failure #1 in feed_args.hpp using Visual Studio 2010

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4636: Run-Time Check Failure #1 in feed_args.hpp using Visual Studio 2010
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-18 09:14:21


#4636: Run-Time Check Failure #1 in feed_args.hpp using Visual Studio 2010
-------------------------------------+-------------------------------------
  Reporter: Rüdiger Brünner | Owner: samuel_krempp
  <rbruenner@…> | Status: new
      Type: Bugs | Component: format
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.43.0 | Keywords: format Run-Time Check
Resolution: | Failure VS2010
-------------------------------------+-------------------------------------

Comment (by timblechmann):

 i'd suggest the following patch:
 {{{
 --- a/boost/format/feed_args.hpp
 +++ b/boost/format/feed_args.hpp
 @@ -21,6 +21,7 @@
  #include <boost/format/format_class.hpp>
  #include <boost/format/group.hpp>
  #include <boost/format/detail/msvc_disambiguater.hpp>
 +#include <boost/integer_traits.hpp>

  namespace boost {
  namespace io {
 @@ -171,8 +172,8 @@ namespace detail {
                     (res_beg[0] !=oss.widen('+') && res_beg[0]
 !=oss.widen('-') ))
                      prefix_space = oss.widen(' ');
              size_type res_size = (std::min)(
 - static_cast<size_type>(specs.truncate_ - !!prefix_space),
 - buf.pcount() );
 + static_cast<size_type>(specs.truncate_ &
 integer_traits<size_type>::const_max - !!prefix_space),
 + static_cast<size_type>(buf.pcount()) );
              mk_str(res, res_beg, res_size, w, oss.fill(), fl,
                     prefix_space, (specs.pad_scheme_ &
 format_item_t::centered) !=0 );
          }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4636#comment:11>
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:14 UTC