Project

General

Profile

Actions

Support #4648

closed

Ambiguous method call boost::signals::connection/boost::signals2::connection

Added by Csaba Kutor over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/03/2016
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Koen Deforche over 8 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?

Actions #2

Updated by Koen Deforche over 8 years ago

  • Assignee set to Koen Deforche
Actions #3

Updated by Trigve Siver over 8 years ago

Aren't you mixing boost's signals and signals2?

Actions #4

Updated by Csaba Kutor over 8 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.

Actions #5

Updated by Koen Deforche over 8 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF