-
Notifications
You must be signed in to change notification settings - Fork 50
feature request: support move only types #7
Comments
Hello @Dushistov, Do you have any reference material about the usage of this kind of data structure? |
Hello @benlau,
The obvious examples are from std c++ library: std::unique_ptr and std::fstream. I suppose generally these are the types that can not have copy/assigment with good and obvious semantic. Personaly I wrap Currently my workaround would be creation of If it is troublesome to implement real support of |
And may be as good start will be:
implementation of perfect forwarding or may be just This should give benefits not only for "move only" classes, but also for common classes like |
hi @Dushistov, Sorry for late reply. I did a test case to validate the behaviour of move only types support by QFuture. Seem that it is not supported by QFuture yet. That is the code:
The compilation error in the line of
If move only type is not supported by QFuture natively , then I have no method to make it works with AsyncFuture. However, the suggestion of using std::move in complete should be a good idea. I will handle it. |
It would be nice to support types with deleted copy constructor/assign operator,
for
AsyncFuture::Observable
andAsyncFuture::Deferred
instantation, for example:The text was updated successfully, but these errors were encountered: