mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Move packet into callback to avoid unnecessary clone, fix forward_iterator value type, and update comments
This commit is contained in:
@@ -223,7 +223,7 @@ struct accepts_type<T, P, enable_if_t<
|
||||
// use enable_if to invoke the Packet& version of the sniff_loop handler if possible - otherwise fail to old behavior
|
||||
template <class Functor, class Packet>
|
||||
bool invoke_loop_cb(Functor& f, Packet& p, typename std::enable_if<accepts_type<Functor, Packet>::value, bool>::type* = 0) {
|
||||
return f(p);
|
||||
return f(std::move(p));
|
||||
}
|
||||
|
||||
template <class Functor, class Packet>
|
||||
|
||||
Reference in New Issue
Block a user