I am having difficulty with some borrowed code that is supposedly working. It contains a class defined like:

Qt Code:
  1. #include <functional>
  2. using namespace std;
  3.  
  4. class ClassName
  5. {
  6. public:
  7. ClassName(parm1 parm, const std::function<double(quint16,quint16)>& func, parm3 param);
  8. };
To copy to clipboard, switch view to plain text mode 

The Qt 5.5 compiler complains:
function does not name a type
and of course, a few errors that cascade after due to this one.

I am not sure what the compiler error is all about. The library <functional> is where the function<> is contained and is included.

What am I missing here?