-
Notifications
You must be signed in to change notification settings - Fork 66
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
Enable noexcept for special member functions #64
Conversation
Thanks for the PR. It looks good but the default constructor could still throw even with |
The hopscotch_hash container already was nothrow move constructible, but was missing the conditional noexcept for the default constructor, swap, and move assignment.
This adds a helper to detect the default growth policies that are noexcept when default initialized with 0.
Thanks for the review, you raised a valid point: |
Sorry for the delay. The change looks good now, thanks. Just a minor question, could we create a default |
This avoids duplication of is_nothrow_default_constructible checks.
Good point. I moved the checks to |
Thanks, looks good. Currently the library is compatible with C++11 (it was so when designed and kept like that) but I'll move the library and tests to C++17 over the weekend as there's no real reason to keep C++11 compatibility and merge the change then. |
I merged the changes. Note that I had to disable the |
The hopscotch_hash container already was nothrow move constructible, but was missing the conditional noexcept for the default constructor, swap, and move assignment.