Opened 11 years ago

Closed 6 years ago

#5715 closed Bugs (fixed)

sequencing with comma does not work for boost::phoenix::bind

Reported by: Gennady Proskurin <gpr@…> Owned by: Thomas Heller
Milestone: To Be Determined Component: phoenix
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

Sample program attached. Correct behaviour, I think, is to call both functions, f() and g(). In new phoenix, only last function g() is called.

Using old phoenix from boost/spirit: c++ func2.cc Phoenix version: 2000 f g

Using new phoenix: c++ func2.cc -D USE_NEW_PHOENIX ./a.out Phoenix version: 3000 g

It seems that comma operator is not overloaded for boost::phoenix::bind (or something like that).

Attachments (1)

func2.cc (494 bytes ) - added by Gennady Proskurin <gpr@…> 11 years ago.

Download all attachments as: .zip

Change History (4)

by Gennady Proskurin <gpr@…>, 11 years ago

Attachment: func2.cc added

comment:1 by John Fletcher <J.P.Fletcher@…>, 9 years ago

The solution to this is that an extra header is needed for Phoenix V3. The actual header is #include <boost/proto/operators.hpp> This can be included by including any of the following: #include <boost/phoenix/operator/member.hpp> #include <boost/phoenix/operator.hpp> #include <boost/phoenix.hpp>

comment:2 by John Fletcher <J.P.Fletcher@…>, 9 years ago

I have countered the need for the extra header by adding #include <boost/proto/operators.hpp> to boost/phoenix/statement/sequence.hpp so that now the headers needed for V2 and V3 are equivalent. I have also added a test bug5715 to check correct operation.

comment:3 by Kohei Takahashi, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.