Virtually all callers of this function (will) pass rvalues, so take
the std::function by value (reaping C++17 guaranteed copy elision) and
std::move() into the member variable ("perfect sink").
Like for many owning types, moves are much cheaper than copies for
std::function, because the external state is merely tranferred between
objects, and not copied.
Amends
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| httptestserver.cpp | ||
| httptestserver_p.h | ||
| tst_qrestaccessmanager.cpp | ||