[C++] Missing include of <functional>, breaks the build on RHEL6 devtoolset-2