Opened 10 years ago

Closed 6 years ago

#7181 closed Bugs (fixed)

'boost::phoenix::actor<Expr>' : default constructor could not be generated

Reported by: m.champlon@… Owned by: Thomas Heller
Milestone: To Be Determined Component: phoenix
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:

Description

Hi,

The following code :

#include <boost/phoenix/bind.hpp>

void f() {}
void g()
{
    boost::phoenix::bind( &f );
}

generates with msvc 2010 the following warnings :

1>C:\dev\include\boost/phoenix/core/actor.hpp(273): warning C4510: 'boost::phoenix::actor<Expr>' : default constructor could not be generated
1>          with
1>          [
1>              Expr=boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,boost::proto::argsns_::list1<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<boost::phoenix::detail::function_ptr<0,void,void (__cdecl *)(void)>>,0>>,1>
1>          ]
1>          ..\..\src\blablabla.cpp(15) : see reference to class template instantiation 'boost::phoenix::actor<Expr>' being compiled
1>          with
1>          [
1>              Expr=boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,boost::proto::argsns_::list1<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<boost::phoenix::detail::function_ptr<0,void,void (__cdecl *)(void)>>,0>>,1>
1>          ]
1>C:\dev\include\boost/phoenix/core/actor.hpp(273): warning C4610: struct 'boost::phoenix::actor<Expr>' can never be instantiated - user defined constructor required
1>          with
1>          [
1>              Expr=boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,boost::proto::argsns_::list1<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<boost::phoenix::detail::function_ptr<0,void,void (__cdecl *)(void)>>,0>>,1>
1>          ]
1>

I suppose one way to supress them would be to add them to the pragma disable at the top of phoenix/core/actor.hpp

Cheers,
MAT.

Attachments (1)

boost_phoenix_7181.patch (1.3 KB ) - added by m.champlon@… 10 years ago.

Download all attachments as: .zip

Change History (4)

by m.champlon@…, 10 years ago

Attachment: boost_phoenix_7181.patch added

comment:1 by m.champlon@…, 10 years ago

Compiling phoenix\test\bind\bind_function_tests.cpp with msvc 2010 exhibits the warnings however using bjam they don't seem to show up, not sure why. The attached patch pragma disables them.

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

Patch applied and posted to phoenix develop

comment:3 by Kohei Takahashi, 6 years ago

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