#include <functional>
#include <cmath>

template<typename... T>
struct pick
{
	template<typename R, typename... U>
	static auto from(R(*ptr)(T..., U...))
	{
		return ptr;
	}
};

int main()
{
	std::function<double(double)>{pick<double>::from(&std::exp)};
}