Comment

Comment by cherryteastain

Why not just pass around an

    std::pair<void(*)(FuncData*), std;:unique_ptr<FuncData>>
at this stage? This implementation has a bunch of performance and ergonomics issues due to things like not using perfect forwarding for the Func1::Call(T) method, so for anything requiring copying or allocating it'll be a decent bit slower and you'll also be unable to pass anything that's noncopyable like an std::unique_ptr.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton