-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Add an user-defined copy constructor #11637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can we =delete copy constructor as well, instead of adding both assignment and copy? |
And probably we should cover all related cases from here https://github.com/intel/llvm/pull/10452/files in one PR. |
We could. "delete" or "default". I thought it would be better to have default constructor and assignment operator then deleting them. @againull, do you prefer to delete? |
Considering the discussion in PR #10452 I believe "delete" is preferrable. |
We can leave the assignment operator (=) as "delete". The static verifier tool reported missing copy constructor with PR #10452 fix and we need to add a copy constructor. To clear, which one do you do think it would be better?
|
The two copy-assignment operators that were "delete" have been changed to "default" Here's the description in PR.
I thought it would be good have default copy = rather than delete them. |
So, why operator= was deleted for classes in https://github.com/intel/llvm/pull/10452/files? I am proposing to apply same logic here and do:
|
Yes, we can do that. Will fix both. Thanks! |
The static verifier reported a missing user defined copy constructor as delete to match to the existing assignment operator.