Move signal into namespace util
signal will clash with the POSIX signal function. This tends to be too annoying to work around with careful inclusion orders or other namespacing.
This commit is contained in:
parent
64448e7e5e
commit
d6b943500c
@ -21,4 +21,4 @@
|
||||
#include "signal.hpp"
|
||||
|
||||
// Instance something probably useful here so that we generate early compile/link errors.
|
||||
template class signal <void>;
|
||||
template class util::signal <void>;
|
||||
|
@ -24,9 +24,9 @@
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
|
||||
template <typename Ret, typename ...Args>
|
||||
class signal {
|
||||
namespace util {
|
||||
template <typename Ret, typename ...Args>
|
||||
class signal {
|
||||
public:
|
||||
typedef Ret (*callback_function)(Args...);
|
||||
typedef std::function<Ret(Args...)> callback_object;
|
||||
@ -71,6 +71,7 @@ class signal {
|
||||
for (auto i = m_children.begin (), end = m_children.end (); i != end; ++i)
|
||||
(*i)(tail...);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#endif // __SIGNAL_HPP
|
||||
|
Loading…
Reference in New Issue
Block a user