Comparing std::tr1::function<> objects

前端 未结 7 1645
粉色の甜心
粉色の甜心 2020-12-07 02:36

I\'ve been trying to implement a C#-like event system in C++ with the tr1 function templates used to store a function that handles the event.

I created a vector so

7条回答
  •  太阳男子
    2020-12-07 03:05

    I don't know if you're locked into std C++ and tr1, but if you aren't, it seems like your problem could be completely avoided if you just used something like boost::signal and boost::bind to solve your original problem - creating an event system - instead of trying to roll your own.

提交回复
热议问题