alliedmodders / amtl

AlliedModders C++ Template Library
29 stars 19 forks source link

Restore ke::Function. #93

Closed dvander closed 4 years ago

dvander commented 4 years ago

Removing this was a little premature as it turns out SourceMod uses it across module boundaries. We cannot use STL across module boundaries.

Instead, simplify this quite a bit. Remove FuncPtr (which was unused), and rename Lambda to Function, removing the old Function implementation. This makes it basically identical to std::function including the caveat that captures must be copy constructable.