-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Typedfield has bad move constructor #4567
Conversation
16b066d
to
5b0875e
Compare
TypedField(TypedField&& u) : SField(std::move(u)) | ||
{ | ||
} | ||
explicit TypedField(private_access_tag_t pat, Args&&... args); |
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.
Do we still need the explicit
keyword? Won't the private_access_tag_t
prevent the compiler from using implicit type conversion?
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.
Not if the parameter pack is empty, which it likely never will be in practice, but explicit
doesn't hurt.
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.
hmm, that's crazy, i didn't know that! that pulls the rug under the purpose of having the private tag :)
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.
There's no real motivation to allow implicit construction as it is only constructed in one file, and even that is handled by a macro.
The Unix unity build is failing, but I'm not sure why :/ |
@ckeshava Can you paste in the first error message you're seeing? |
I didn't see any issue on my Mac. I was going through the CI/CD pipeline and saw this error |
5b0875e
to
ebbfd7d
Compare
Rebased to develop. |
Apply a minor cleanup in `TypedField`: * Remove a non-working and unused move constructor. * Constrain the remaining constructor to not be overly generic enough as to be used as a copy or move constructor.
Apply a minor cleanup in `TypedField`: * Remove a non-working and unused move constructor. * Constrain the remaining constructor to not be overly generic enough as to be used as a copy or move constructor.
Apply a minor cleanup in `TypedField`: * Remove a non-working and unused move constructor. * Constrain the remaining constructor to not be overly generic enough as to be used as a copy or move constructor.
Hello, when will Radar open the network? Please reply. |
High Level Overview of Change
A minor cleanup in
TypedField
. It removes a non-working and unused move constructor. And it constrains the remaining constructor to not be overly generic enough as to be used as a copy or move constructor.Context of Change
Type of Change