Update Spectra to v1.0.1 to fix C++20 compatibility issues on GCC/Clang #1871
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GTSAM currently unfortunately fails to build with C++20 or newer on GCC and Clang with the following errors in ShonanAveraging.cpp:
This PR updates the vendored Spectra from v0.9.0 to the latest v1.0.1 as a simple fix for these C++20 compatibility issues. I also moved the Spectra headers under a
Spectra/...
prefix to match the installed header paths since v0.7.0.Change log: https://github.com/yixuan/spectra/blob/master/CHANGELOG.md
Since this is a major version bump, there are some breaking changes in the Spectra API, which are listed in the migration guide: https://spectralib.org/upgrade
Corresponding changes to ShonanAveraging.cpp:
To be honest, I would personally be hesitant to merge such an unwieldy PR, so you might want to commit these changes yourself or at least diff them against the official Spectra sources.