dimanche 21 avril 2019

Default value of function as a function argument

How do I properly define a default return value of a function that is an argument of another function?

Let's say I have a function like that:

bool x( ... , std::function<bool( ... )> func ) { ... ; return func( ... ); }

I would like x to return true if it's called without the last argument.

Aucun commentaire:

Enregistrer un commentaire