-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix MSVC 14.1 complaining about "attempting to reference a deleted function" in RenderPassClearValue #86507
Conversation
…ion" in RenderPassClearValue
1b923d9
to
5d361a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it happen if instead of that change, the initializer is removed from Color
, that, after all, zero-initializes internally?
@RandomShaper Sorry I don't quite understand, where do we put the zero-initializes? In the constructor? |
@RandomShaper Still doesn't work because Color doesn't have a trivial constructor (at least that's what the error message says) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me. @RandomShaper should have a chance to take another look before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. The compiler deletes the constructor to be safe, so an explicit constructor is needed. Makes sense! My only (soft) suggestion now would be to use the = default
syntax, but I'm fine with either.
lol that won't work too. see https://godbolt.org/z/TY34Ph54G So I guess it should stay as it is now |
Thanks! |
Fixes #86443
We could also add something like
new (&color) Color()
inside the ctor, but it doesn't seems very necessary.