Top "Std-function" questions

A C++11 class template that is callable like a function, and wraps another callable type and forwards calls to it.

C++ function types

I have a problem understanding function types (they appear e.g. as the Signature template parameter of a std::function): …

c++ c++11 function-pointers std-function
Comparing std::functions for equality?

How can I compare two C++11 std::functions with operator==, and return true if both of said functions refer to …

c++ c++11 function-pointers std-function
C++11 variadic std::function parameter

A function named test takes std::function<> as its parameter. template<typename R, typename ...A> void …

c++ c++11 templates variadic-templates std-function
C++ How to Reference Templated Functions using std::bind / std::function

If you have a templated class or a templated function, (or combination of the two), how do you bind that …

c++ c++11 callback function-pointers std-function
Why do std::function instances have a default constructor?

This is probably a philosophical question, but I ran into the following problem: If you define an std::function, and …

c++ std-function
Performance of std::function compared to raw function pointer and void* this?

Library code: class Resource { public: typedef void (*func_sig)(int, char, double, void*); //Registration registerCallback(void* app_obj, func_sig …

c++ c++11 boost-function std-function
Vector of std::function with different signatures

I have a number of callback functions with different signatures. Ideally, I would like to put these in a vector …

c++ c++11 stdvector std-function
How to pass std::function with different parameters to same function

I have three functions I'm looking to merge together. Each one takes an std::function as the first parameter, then …

c++ c++11 templates variadic-templates std-function
std::function fails to distinguish overloaded functions

I am trying to understand why std::function is not able to distinguish between overloaded functions. #include <functional> …

c++ c++11 overload-resolution std-function
Binding to a weak_ptr

Is there a way to std::bind to a std::weak_ptr? I'd like to store a "weak function" callback …

c++ callback bind weak-ptr std-function