Skip to content

Instantly share code, notes, and snippets.

View jmjatlanta's full-sized avatar

John M. Jones jmjatlanta

View GitHub Profile
@jmjatlanta
jmjatlanta / pub_sub_cpp.cpp
Last active December 23, 2024 05:33 — 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;
/***
* A base class for event arguments