Support #4648
closedAmbiguous method call boost::signals::connection/boost::signals2::connection
0%
Description
Hello,
I need your kind help to figure out how could this issue be fixed in the Hello World application presented on official website. I have spent long time to find the answer, but nowhere in the forum nor in google search found the answer.
The are 2 method calls:
button->clicked().connect(this, &HelloApplication::greet);
nameEdit_->enterPressed().connect
(boost::bind(&HelloApplication::greet, this));
Whenever I start the compiler it is complaining about:
'connect' is ambiguous '
Candidates are:
boost::signals2::connection connect(const boost::_bi::bind_t<void,boost::_mfi::mf0<void,HelloApplication>,boost::_bi::list1<boost::_bi::value<HelloApplication *>>> &)
boost::signals::connection connect(const boost::_bi::bind_t<void,boost::_mfi::mf0<void,HelloApplication>,boost::_bi::list1<boost::_bi::value<HelloApplication *>>> &)
' main.cpp /test line 70 Semantic Error
'connect' is ambiguous '
Candidates are:
boost::signals2::connection connect(HelloApplication , void (HelloApplication::)())
boost::signals::connection connect(HelloApplication , void (HelloApplication::)())
' main.cpp /test line 65 Semantic Error
As far as understand this boost package is critical in Wt event handling mechanism so I am stucked a bit in the learning process.
The first time when I installed the framework from precompiled deb package there was only a warning about boost signals but the program could run. When I compiled the 3.3.5 package this sort of issue arised.
I would really appreciate if someone could publish the right syntax.
Thank you,
Csaba Kutor
Updated by Koen Deforche almost 9 years ago
- Status changed from New to Feedback
Hey, what compiler is this? I can't understand how the compiler can confuse these two calls since the type of the signal clearly mandates one or the other. Could you also attach your CMakeCache.txt of the Wt build?
Updated by Trigve Siver almost 9 years ago
Aren't you mixing boost's signals and signals2?
Updated by Csaba Kutor almost 9 years ago
Hello,
Please do not waste your time. Most probably it is due some incorrect compilation settings from my side. I deleted the folders so I cant attach any file. I actually installed a new pc with debian 8 using the standard repositories' boost and witty packages. Since that time problem has gone.
Thank you for your investigation.
The issue can be closed.
Updated by Koen Deforche almost 9 years ago
- Status changed from Feedback to Closed