Re: [Boost-bugs] [Boost C++ Libraries] #6040: static_cast_ problem in Phoenix v3

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6040: static_cast_ problem in Phoenix v3
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-10-20 09:53:16


#6040: static_cast_ problem in Phoenix v3
-------------------------------------------------------+--------------------
  Reporter: Dragomir Ivanov <drago.ivanov@…> | Owner: theller
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: phoenix
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords: static_cast_, phoenixv3
-------------------------------------------------------+--------------------

Comment (by Dragomir Ivanov <drago.ivanov@…>):

 Oh my, the formating is screwed.

 {{{
 #include <boost/spirit/include/phoenix.hpp>
 //#include <boost/phoenix.hpp>
 #include <vector>
 #include <algorithm>
 #include <sstream>

 int main()
 {
     std::vector<unsigned char> data;
     using boost::phoenix::arg_names::_1;
     using boost::phoenix::static_cast_;
     std::ostringstream oss;
     oss << std::hex;
     std::for_each(data.begin(),data.end(), oss << static_cast_<unsigned
 int>(_1) );
 }
 }}}

 Replying to [ticket:6040 Dragomir Ivanov <drago.ivanov@…>]:
> Hi,
> I have the following snippet, which compiles fine with Phoenix v2, but
 spits a bunch of compile errors with Phoenix v3. This is GCC 4.6.1, Boost
 1.47. Thank you.
>
> #include <boost/spirit/include/phoenix.hpp>
> //#include <boost/phoenix.hpp>
> #include <vector>
> #include <algorithm>
> #include <sstream>
>
> int main()
> {
> std::vector<unsigned char> data;
> using boost::phoenix::arg_names::_1;
> using boost::phoenix::static_cast_;
> std::ostringstream oss;
> oss << std::hex;
> std::for_each(data.begin(),data.end(), oss << static_cast_<unsigned
 int>(_1) );
> }
>

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