From 47d0e69b46cb293567efbe3b8a595e1d83529719 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 21 Jul 2020 15:01:33 +1000 Subject: [PATCH] signal: treat function-ref signals as if they were std::function --- signal.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/signal.hpp b/signal.hpp index 7dbe49c7..ea2375aa 100644 --- a/signal.hpp +++ b/signal.hpp @@ -189,6 +189,17 @@ namespace cruft { }; + //------------------------------------------------------------------------- + // Function references are _actually_ used as if they are std::function + // objects in our libraries. + // + // TODO: avoid this implicit conversion without need a massive rewrite. + template + class signal : + public signal> + { }; + + /////////////////////////////////////////////////////////////////////////// // wrap a value in a signal and trigger on assignment //template class ReductionT>