aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/event.h
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-11-21 13:03:03 -0500
committerDeterminant <ted.sybil@gmail.com>2018-11-21 13:03:03 -0500
commit2b1f6791ddfd8ef4fb21cb4b50a3d6bc86945867 (patch)
tree53cf01786c197b2ce6cdf931ffb2f2ea2f1ddff6 /include/salticidae/event.h
parent2b6b415abc1da56c30bf02442de5b149e23648fc (diff)
improve network.h
Diffstat (limited to 'include/salticidae/event.h')
-rw-r--r--include/salticidae/event.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/salticidae/event.h b/include/salticidae/event.h
index 4c48ab7..bac707c 100644
--- a/include/salticidae/event.h
+++ b/include/salticidae/event.h
@@ -481,8 +481,9 @@ class ThreadCall {
}
template<typename T>
void set_result(T &&data) {
- result = Result(new T(std::forward<T>(data)),
- [](void *ptr) {delete static_cast<T *>(ptr);});
+ using _T = std::remove_reference_t<T>;
+ result = Result(new _T(std::forward<T>(data)),
+ [](void *ptr) {delete static_cast<_T *>(ptr);});
}
};