Project

General

Profile

Actions

Bug #9864

open

Wt::Signal doesn't properly bind to function object with 4 or more arguments

Added by Roel Standaert almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
03/04/2022
Due date:
% Done:

0%

Estimated time:

Description

We'll need to revise how signals are connected to slots, we have some ConnectHelper specializations in signals.hpp for 0, 1, 2, or 3 arguments, but I feel like with C++14 we should be able to make it work with any number?

For example, this doesn't compile:

  Wt::Signal<std::string, std::string, std::string, std::string> signal;

  signal.connect([](const std::string &s1,
                    const std::string &s2,
                    const std::string &s3,
                    const std::string &s4) {
    assert(s1 == "a");
    assert(s2 == "b");
    assert(s3 == "c");
    assert(s4 == "d");
  });

  signal.emit("a", "b", "c", "d");

No data to display

Actions

Also available in: Atom PDF