You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding is that these are supposed to be fairly light weight classes. I think resources are trivial most of the time, but events may need to own their data.
The type erasure is currently implemented with inheritance and shared_ptr. Does it make sense to use std::variant when we move to c++17?
The text was updated successfully, but these errors were encountered:
The main trick really is dealing with the lifetime and single cleanup issue. Using variant would remove the atomic on each copy, so that would be nice and might be worth a try. The semantics would be a bit different, but we don't do anything on destruction so it should work out. Might even be fine to use std::any now that I think about it, bit different tradeoff, worth trying I think.
My understanding is that these are supposed to be fairly light weight classes. I think resources are trivial most of the time, but events may need to own their data.
The type erasure is currently implemented with inheritance and shared_ptr. Does it make sense to use std::variant when we move to c++17?
The text was updated successfully, but these errors were encountered: