#include <iostream>
#include <functional>
using std::cout;
using std::endl;
int main()
{
auto pow3 = std::bind(std::multiplies<int>(),
std::bind(std::multiplies<int>(),
std::placeholders::_1, std::placeholders::_1),
std::placeholders::_1);
cout << pow3(2) << endl;
cout << pow3(3) << endl;
cout << pow3(4) << endl;
}
/*
run:
8
27
64
*/