Skip to content
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

Delete copy constructor for ThreadLocalStorage #10420

Conversation

masterleinad
Copy link
Member

Fixes https://cdash.43-1.org/viewBuildError.php?buildid=6898.
Neither std::shared_mutex nor std::shared_timed_mutex are copy-constructible so the implicitly defined defaulted copy constructor (and move constructor) is deleted (https://en.cppreference.com/w/cpp/thread/shared_mutex/shared_mutex). Apparently, we are not using it at all.
We see the error only with older versions because non-matching exception specifiers for defaulted functions (which we have here since these types are not no-throw-move-constructible) should result in implicitly deleted functions according to a correction in the standard. Previously, this should give a compile error directly which we are seeing.

If we need a copy constructor, we need to implement it explicitly.

Copy link
Member

@tamiko tamiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Thanks for the fixup!

@masterleinad
Copy link
Member Author

/rebuild

@tamiko tamiko merged commit 2c5b41f into dealii:master May 30, 2020
@masterleinad masterleinad deleted the delete_copy_constructor_thread_local_storage branch May 31, 2020 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants