Re: [Boost-bugs] [Boost C++ Libraries] #2024: boost::format("%p") % (uint8_t *) str is not like printf("%p", str)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2024: boost::format("%p") % (uint8_t *) str is not like printf("%p", str)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-28 02:47:36


#2024: boost::format("%p") % (uint8_t *) str is not like printf("%p", str)
---------------------------------------------------+------------------------
 Reporter: Geoff Barrett <gbarrett@…> | Owner: samuel_krempp
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: format
  Version: Boost 1.34.0 | Severity: Problem
 Keywords: |
---------------------------------------------------+------------------------

Comment(by marshall):

 This still a problem in 1.42:
 {{{
 #include <iostream>
 #include <boost/format.hpp>
 #include <cstdlib>

 int main ( int argc, char *argv[] ) {
         const char *foo = "Hi Mom!";
         std::cout << str ( boost::format ( "%p" ) % foo ) << std::endl;
         printf ( "%p\n", foo );
         return 0;
         }
 }}}

 prints two different lines.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2024#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-02-16 18:50:02 UTC