为什么我不能将两个bool值传递给std :: function?

时间:2014-07-15 07:39:47

标签: c++11

我想通过使用std :: function定义一个回调,定义如下:

typedef std::function<void (const std::string &, const std::string &,
    const bool, const bool)> Callback;

但它有语法错误,我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:0)

你应该包括功能,使用功能:

#include <functional>