Opened 11 years ago

Closed 11 years ago

#5968 closed Bugs (fixed)

phoenix bind and signals2 signal connect fails to compile

Reported by: Lars Viklund <zao@…> Owned by: Thomas Heller
Milestone: Boost 1.48.0 Component: phoenix
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

Using a Phoenix bind in a Signals2 signal fails to compile with errors in either fusion::category_of where actor is missing the category type (in 1.47.0), or in phoenix visit_each (in trunk r74198).

#include <boost/phoenix.hpp>
#include <boost/signals2.hpp>
 
struct s
{
        bool f(int, bool) { return true; }
};
 
int main()
{
        s s_obj;
        boost::signals2::signal<bool (int, bool)> sig;
        sig.connect(
                boost::phoenix::bind(
                        &s::f, &s_obj,
                        boost::phoenix::placeholders::arg1,
                        boost::phoenix::placeholders::arg2));
}

Simplifying the bind to the following expression has the same results:

(val(&s_obj)->*&s::f)(arg1, arg2)

Change History (2)

comment:1 by Thomas Heller, 11 years ago

This code works fine with gcc 4.6, which compiler do you have problems with?

comment:2 by Thomas Heller, 11 years ago

Milestone: To Be DeterminedBoost 1.48.0
Resolution: fixed
Status: newclosed

Fixed for msvc10 with [74839], thanks for reporting.

Note: See TracTickets for help on using tickets.