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.
Upgrade to C++20. Notes:
We need to upgrade
autocheckfor this because our current version usesstd::result_of—I replaced it with the most recent release (and added the LICENSE file), although maybe we should replace it with a submodule insteadfmt::formatrequires a compile-time constant first parameter in 20 or to wrap infmt::runtime—I wrapped the ones that prevent a compile, but most of those arestd::strings that could probably be some variation ofconstexpr char[]sfor
fmtto work on clang, it seems that we need to have a version starting from this commit. Otherwise, code like the following doesn't workSo, I bumped the versions of
fmtandspdlogFMT_STRINGwithout any template arguments no longer picks up the right overload, but the C++20 version seems to correctly do compile-time strings with out it, so I updatedLogging.hto reflect this. One alternative is using the following macro, but I think it's probably cleaner to just remove theFMT_STRINGusage inLogging.hxdrppon its current master doesn't work with C++20 because it will add a flag to enable C++11 features; the current change (in my fork) is the config only changes from the first commit on thecxx20branch, but the output still isn't great. Also, note that doing the full first commit from thecxx20(or thecxx20branch) would require a bigger lift since it changes other parts of the codebaseThis known issue is because autoconf adds a flag to enable C++11 features since C++20 isn't fully backwards compatible. Unfortunately, the patch is not in a released version of autoconf. Options include: using C++17 for
xdrccompilation, usingconfig/ax_cxx_compile_stdcxx.m4(which that thread suggests is what GDB and GCC use instead ofAC_PROG_CXX), or manually getting the patch.