Publish&Subscribe Pattern in C++