util: allow emitSignal with non-zero arguments

refs #2329

Change-Id: I7708878343f87bceff3c52c9266afcfd388e8683
diff --git a/src/util/signal-signal.hpp b/src/util/signal-signal.hpp
index 444c702..e1c01df 100644
--- a/src/util/signal-signal.hpp
+++ b/src/util/signal-signal.hpp
@@ -29,6 +29,8 @@
 namespace util {
 namespace signal {
 
+class DummyExtraArg;
+
 /** \brief provides a lightweight signal / event system
  *
  *  To declare a signal:
@@ -76,6 +78,12 @@
   void
   operator()(const TArgs&...args);
 
+  /** \brief (implementation detail) emits a signal
+   *  \note This overload is used by signal-emit.hpp.
+   */
+  void
+  operator()(const TArgs&...args, const DummyExtraArg&);
+
   // make Owner a friend of Signal<Owner, ...> so that API for owner can be called
 #if NDN_CXX_HAVE_CXX_FRIEND_TYPENAME
   friend Owner;
@@ -208,6 +216,13 @@
   m_isExecuting = false;
 }
 
+template<typename Owner, typename ...TArgs>
+inline void
+Signal<Owner, TArgs...>::operator()(const TArgs&... args, const DummyExtraArg&)
+{
+  this->operator()(args...);
+}
+
 } // namespace signal
 
 // expose as ndn::util::Signal