[Boost-bugs] [Boost C++ Libraries] #10852: boost format operator % won't accept dereference of volatile

Subject: [Boost-bugs] [Boost C++ Libraries] #10852: boost format operator % won't accept dereference of volatile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-04 21:43:55


#10852: boost format operator % won't accept dereference of volatile
------------------------------+---------------------------
 Reporter: paul.d.rose@… | Owner: samuel_krempp
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: format
  Version: Boost 1.56.0 | Severity: Regression
 Keywords: format volatile |
------------------------------+---------------------------
 struct A{
     A() : a(9) {}
     int a;
 };
 A a;
 A volatile *pva = &a;

   std::cout << boost::format("%d") % pva->a << std::endl;

 This worked in 1_54 but fails in 1_56 with error:

 format/feed_args.hpp:135:47: error: invalid conversion from 'volatile
 void*' to 'const void*'


 Can work around this with cast:
   std::cout << boost::format("%d") % (int)pva->a << std::endl;
 but should not have to. The appearance to the user is pass by value.

 Running linux with g++ 4.6.2 and 4.8.2

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