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

Compile error: exception specification of explicitly defaulted move assignment operator does not match the calculated one #49566

Closed
pjf opened this issue Jul 4, 2021 · 2 comments · Fixed by #49571
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments

Comments

@pjf
Copy link
Contributor

pjf commented Jul 4, 2021

Describe the bug

Compiling with clang 8.0 on Ubuntu 16.04 gives the following compile error:

src/player_activity.h:90:26: error: exception specification of explicitly defaulted move assignment operator does not match the calculated one
        player_activity &operator=( player_activity && ) noexcept = default;

Steps To Reproduce

  • Check out origin/master on Ubuntu 16.04
  • make -j8 RELEASE=1 TILES=1 CLANG=1 ASTYLE=0 USE_HOME_DIR=1 SOUND=1 LINTJSON=0 NOOPT=0 RUNTESTS=0

Expected behavior

Compiles happily without errors.

Versions and configuration

Other notes

I suspect this is some sort of STL shenanigans like we saw in #48482.

@anothersimulacrum anothersimulacrum added <Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` labels Jul 4, 2021
@BrettDong BrettDong added the Code: Build Issues regarding different builds and build environments label Jul 4, 2021
@ZhilkinSerg
Copy link
Contributor

Try adding list_is_noexcept, i.e.:

player_activity &operator=( player_activity && ) noexcept ( list_is_noexcept ) = default;

@pjf
Copy link
Contributor Author

pjf commented Jul 4, 2021

@ZhilkinSerg : That works, thank you!

Pull request opened with changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants