Chapter 19,20 까지
using Matcher = bool(*)(int, int);
다른 함수를 매개변수로 받는 함수 또는 함수를 리턴 하는 함수를 **higher-order function(고차 함수)**이라 부른다.
주 용도
HMODULE lib { ::LoadLibrary("hardware.dll") };
using ConnectFunction = int(__stdcall*)(bool, int, const char*);
ConnectFunction connect { (ConnectFunction)::GetProcAddress(lib, "Connect"); }
connect(true, 3, "Hello world");
int (Employee::*methodPtr) () const { &Employee::getSalary };
Employee employee { "John", "Doe" };
cout << (**employee.*methodPtr**)() << endl;
std::function<R(ArgTypes...)>
vector<int> values { 1, 2, 3 };
double result { accumulateData(cbegin(values), cend(values), 1.1, multiplies<>{}) };