Daily bit(e) of C++ #85, Wrapping legacy resources with std::unique_ptr
Thanks for this! I was thinking of making SDL value type wrappers using this technique. Is that a good idea?
For some of it, sure (for example SDL_Window).
However, this is very much for ad-hoc wrapping. If you are going to use the same type multiple times it might be worth writing a dedicated wrapper type (it's very easy).
Thanks for this! I was thinking of making SDL value type wrappers using this technique. Is that a good idea?
For some of it, sure (for example SDL_Window).
However, this is very much for ad-hoc wrapping. If you are going to use the same type multiple times it might be worth writing a dedicated wrapper type (it's very easy).