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

Workaround missing noexcept for std::string move assignment #87

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

cj-tommi-rantala
Copy link
Contributor

Due to GCC/libstdc++ bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58265 the string move assignment may be missing noexcept, resulting in build errors even with relative recent GCC versions:

nanobench.h:2898:9: error: function 'ankerl::nanobench::Config& ankerl::nanobench::Config::operator=(ankerl::nanobench::Config&&)' defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ''
 Config& Config::operator=(Config&&) noexcept = default;
         ^~~~~~

Hit this with some GCC 7.5.0 based cross toolchain, and for me it's locally reproducible (in Ubuntu) with g++-8 -D_GLIBCXX_USE_CXX11_ABI=0 ...

Due to GCC/libstdc++ bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58265
the string move assignment may be missing noexcept, resulting in build
errors even with relative recent GCC versions:

```
nanobench.h:2898:9: error: function 'ankerl::nanobench::Config& ankerl::nanobench::Config::operator=(ankerl::nanobench::Config&&)' defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ''
 Config& Config::operator=(Config&&) noexcept = default;
         ^~~~~~
```
@martinus martinus merged commit 407feab into martinus:master Feb 16, 2023
@martinus
Copy link
Owner

Thanks!

@cj-tommi-rantala cj-tommi-rantala deleted the string-noexcept branch February 17, 2023 09:08
fanquake added a commit to bitcoin-core/gui that referenced this pull request Nov 16, 2023
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan)

Pull request description:

  The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11.

  Other changes from the release notes:

  * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84
  * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87
  * removed the link by martinus in martinus/nanobench#89
  * Lots of minor cleanups by martinus in martinus/nanobench#85
  * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90

ACKs for top commit:
  fanquake:
    ACK fe434a4 - have not tested.

Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan)

Pull request description:

  The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11.

  Other changes from the release notes:

  * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84
  * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87
  * removed the link by martinus in martinus/nanobench#89
  * Lots of minor cleanups by martinus in martinus/nanobench#85
  * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90

ACKs for top commit:
  fanquake:
    ACK fe434a4 - have not tested.

Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan)

Pull request description:

  The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11.

  Other changes from the release notes:

  * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84
  * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87
  * removed the link by martinus in martinus/nanobench#89
  * Lots of minor cleanups by martinus in martinus/nanobench#85
  * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90

ACKs for top commit:
  fanquake:
    ACK fe434a4 - have not tested.

Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan)

Pull request description:

  The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11.

  Other changes from the release notes:

  * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84
  * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87
  * removed the link by martinus in martinus/nanobench#89
  * Lots of minor cleanups by martinus in martinus/nanobench#85
  * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90

ACKs for top commit:
  fanquake:
    ACK fe434a4 - have not tested.

Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 25, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan)

Pull request description:

  The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11.

  Other changes from the release notes:

  * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84
  * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87
  * removed the link by martinus in martinus/nanobench#89
  * Lots of minor cleanups by martinus in martinus/nanobench#85
  * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90

ACKs for top commit:
  fanquake:
    ACK fe434a4 - have not tested.

Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants