Generic observer pattern in c++11