Category "std-function"

How to best design function that takes an unary predicate

I'm implementing a simple timeout-class which calls a given function when time runs out. However I'm scratching my head on how to make the function constructor

What is the purpose of std::function, and how to use it?

It is necessary to me to use std::function but I don't know what the following syntax means. std::function<void()> f_name = []() { FNAME(); }; What is