Project

General

Profile

Support #4424

(boost:: && std::) bind of Wt::WApplication* application_creator fails with too few arguments

Added by Markus Klemm almost 7 years ago. Updated almost 7 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/26/2015
Due date:
% Done:

0%

Estimated time:

Description

This is the problem I asked a few weeks ago on stackoverflow in the Wt section, so for better formatting I recommend reading there:

http://stackoverflow.com/q/31968857/3537677

--- Summary of link content

I want to bind my additional parameters for my Wt::WApplication* MDDB_Service::application_creator(const Wt::WEnvironment& env, int foo); function like in the example. My solution compiles perfectly with gcc/mingw but with MSVC/Visual Studio 2013 Express, it fails with the error: "Error 94 error C2198: 'Wt::WApplication *(__cdecl *)(const Wt::WEnvironment &,int)' : too few arguments for call ...include\boost\function\function_template.h"

I used Wt::WRun(argc, argv,boost::bind(MDDB_Service::application_creator, _1, 5)); and also Wt::WRun(argc, argv,std::bind(MDDB_Service::application_creator, std::placeholders::_1, 5));.

The audience at stackoverflow supposes that this bug may be related to the fact that the default constructor of Wt::WEnvironment is not public.

Wt version : 3.3.4.

Also available in: Atom PDF