Skip to content

Instantly share code, notes, and snippets.

@gitaaronc
gitaaronc / pub_sub_cpp.cpp
Created January 23, 2016 03:28 — forked from makomweb/pub_sub_cpp.cpp
Fun with C++: implementing a pub/sub scenario using std::bind and other standard facilities. The approach is pretty similar to the well known .NET event mechanism.
#include <iostream>
#include <map>
#include <algorithm>
#include <functional>
#include <memory>
using namespace std;
class EventArgs {
public: