Bug #7582 ยป 0001-Trial-fix-for-perfect-forwarding-for-signals.patch
| src/Wt/Chart/WCartesianChart.C | ||
|---|---|---|
|
seriesSelected_.emit(closestSeries,
|
||
|
mapFromDeviceWithoutTransform(closestPointBeforeSeriesTransform, closestSeries->axis()));
|
||
|
} else {
|
||
|
seriesSelected_.emit(0, mapFromDeviceWithoutTransform(closestPointBeforeSeriesTransform, Axis::Y));
|
||
|
seriesSelected_.emit(nullptr, mapFromDeviceWithoutTransform(closestPointBeforeSeriesTransform, Axis::Y));
|
||
|
}
|
||
|
}
|
||
| src/Wt/Signals/signals.hpp | ||
|---|---|---|
|
}
|
||
|
// Emit a signal, i.e. invoke all its callbacks.
|
||
|
void emit (Args... args) const
|
||
|
template <class... B>
|
||
|
void emit (B&&... args) const
|
||
|
{
|
||
|
if (!callback_ring_)
|
||
|
return;
|
||
| ... | ... | |
|
do {
|
||
|
if (link->active()) {
|
||
|
try {
|
||
|
link->function(std::forward<Args>(args) ...);
|
||
|
link->function(std::forward<B>(args) ...);
|
||
|
} catch (...) {
|
||
|
link->decref();
|
||
| src/Wt/WSignal.h | ||
|---|---|---|
|
* arguments.
|
||
|
*/
|
||
|
#ifndef WT_CNOR
|
||
|
void emit(A... args) const;
|
||
|
template<class... B>
|
||
|
void emit(B&&... args) const;
|
||
|
#else // WT_CNOR
|
||
|
void emit(A1 a1 = NoClass::none, A2 a2 = NoClass::none,
|
||
|
A3 a3 = NoClass::none, A4 a4 = NoClass::none,
|
||
| ... | ... | |
|
* \sa emit
|
||
|
*/
|
||
|
#ifndef WT_CNOR
|
||
|
void operator()(A... args) const;
|
||
|
template<class... B>
|
||
|
void operator()(B&&... args) const;
|
||
|
#else // WT_CNOR
|
||
|
void operator()(A1 a1 = NoClass::none, A2 a2 = NoClass::none,
|
||
|
A3 a3 = NoClass::none, A4 a4 = NoClass::none,
|
||
| ... | ... | |
|
}
|
||
|
template <class... A>
|
||
|
void Signal<A...>::emit(A... args) const
|
||
|
template <class... B>
|
||
|
void Signal<A...>::emit(B&&... args) const
|
||
|
{
|
||
|
impl_.emit(std::forward<A>(args)...);
|
||
|
impl_.emit(std::forward<B>(args)...);
|
||
|
}
|
||
|
template <class... A>
|
||
|
void Signal<A...>::operator()(A... args) const
|
||
|
template <class... B>
|
||
|
void Signal<A...>::operator()(B&&... args) const
|
||
|
{
|
||
|
emit(std::forward<A>(args)...);
|
||
|
emit(std::forward<B>(args)...);
|
||
|
}
|
||
|
template <class... A>
|
||