Last active
September 8, 2015 13:38
-
-
Save Superlokkus/fac974528a3831adf165 to your computer and use it in GitHub Desktop.
Wt bind problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace detail { | |
namespace function { | |
template< | |
typename FunctionPtr, | |
typename R BOOST_FUNCTION_COMMA | |
BOOST_FUNCTION_TEMPLATE_PARMS | |
> | |
struct BOOST_FUNCTION_FUNCTION_INVOKER | |
{ | |
static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA | |
BOOST_FUNCTION_PARMS) | |
{ | |
FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr); | |
return f(BOOST_FUNCTION_ARGS);//<-THIS LINE | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error 94 error C2198: 'Wt::WApplication *(__cdecl *)(const Wt::WEnvironment &,int)' : too few arguments for call c:\users\klm\downloads\wt-3.3.4-msvs2013-windows-x86-sdk\include\boost\function\function_template.hpp 95 1 MDDB_Web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <functional> | |
#include <boost/function.hpp> | |
#include <boost/bind.hpp> | |
#include <Wt/WServer> | |
Wt::WApplication *createApplication(const Wt::WEnvironment& env, int i) { | |
return new Wt::WApplication(env); | |
} | |
int main(int argc, char** argv) | |
{ | |
Wt::WRun(argc, argv,std::bind(&createApplication, std::placeholders::_1, 1)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment