You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to replace boost signals2 with sigslot. But code that does not report an error using boost signals2 will report an error using sigslot.
`enum class EventType : uint32_t
{
_1,
};
I want to replace boost signals2 with sigslot. But code that does not report an error using boost signals2 will report an error using sigslot.
`enum class EventType : uint32_t
{
_1,
};
class CBaseData
{
public:
CBaseData()
{
}
virtual ~CBaseData()
{
}
public:
private:
};
using tPublisherSignal = sigslot::signal< void( EventType ,const CBaseData &)>;
using tPublisherConnect = sigslot::connection;
tPublisherSignal mSig;
tPublisherConnect subscribeEvent(const std::function<void(EventType, const CBaseData &)> &subscriber) {
return mSig.connect(subscriber);
}
int main() {
subscribeEvent([](EventType, const CBaseData &) {
//std::cout << typeid(CBaseData).name() << std::endl;
});
}`
BUILD info:
/Users/wanglei/Code/Git/sigslot/example/basic.cpp:97:17: error: no matching member function for call to 'connect' 97 | return mSig.connect(subscriber); | ~~~~~^~~~~~~ /Users/wanglei/Code/Git/sigslot/include/sigslot/signal.hpp:1244:5: note: candidate template ignored: requirement 'trait::is_callable_v<sigslot::trait::typelist<void (EventType, const CBaseData &)>, const std::function<void (EventType, const CBaseData &)> &>' was not satisfied [with Callable = const std::function<void (EventType, const CBaseData &)> &] 1244 | connect(Callable && c, group_id gid = 0) { | ^ /Users/wanglei/Code/Git/sigslot/include/sigslot/signal.hpp:1285:5: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided 1285 | connect(Pmf && pmf, Ptr && ptr, group_id gid = 0) { | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/wanglei/Code/Git/sigslot/include/sigslot/signal.hpp:1306:5: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided 1306 | connect(Pmf && pmf, Ptr && ptr, group_id gid = 0) { | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/wanglei/Code/Git/sigslot/include/sigslot/signal.hpp:1354:5: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided 1354 | connect(Pmf && pmf, Ptr && ptr, group_id gid = 0) { | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/wanglei/Code/Git/sigslot/include/sigslot/signal.hpp:1384:5: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided 1384 | connect(Callable && c, Trackable && ptr, group_id gid = 0) { | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered: