Re: [Boost-bugs] [Boost C++ Libraries] #4658: (boost::format("%u") % (unsigned char)2).str(); error result

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4658: (boost::format("%u") % (unsigned char)2).str(); error result
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-12 02:14:22


#4658: (boost::format("%u") % (unsigned char)2).str(); error result
---------------------------+--------------------------------
  Reporter: anonymous | Owner: James E. King, III
      Type: Bugs | Status: assigned
 Milestone: Boost 1.44.0 | Component: format
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
---------------------------+--------------------------------
Changes (by James E. King, III):

 * status: new => assigned
 * owner: Samuel Krempp => James E. King, III

Comment:

 Is this a fair test to represent the report? There wasn't much to go on:
 {{{
     // trac-4658
     s = (format("%1%") % (unsigned char)2).str();
     BOOST_CHECK_EQUAL(1, s.length());
     BOOST_CHECK_EQUAL(0x02, s.at(0));
     s = (format("%u") % (unsigned char)2).str();
     BOOST_CHECK_EQUAL(1, s.length());
     BOOST_CHECK_EQUAL('2', s.at(0));
     s = (format("%1%") % (char)3).str();
     BOOST_CHECK_EQUAL(1, s.length());
     BOOST_CHECK_EQUAL(0x03, s.at(0));
     s = (format("%d") % (char)3).str();
     BOOST_CHECK_EQUAL(1, s.length());
     BOOST_CHECK_EQUAL('3', s.at(0));
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/4658#comment:1>
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-10-12 02:20:58 UTC