Allow using C++20 as a fallback - #2
afbjorklund wants to merge 1 commit into
Conversation
|
The The core claim doesn't hold up. The comments say
So the three Suggestion: keep just the If there's a different C++23-only feature elsewhere in the codebase that actually motivated this (rather than the |
|
Thanks for the detailed investigation! I am happy also to throw C++20 under the bus, and skip all legacy compatbility. archivemount-ng)
VER=${DIR/*-/}
# Change from C++23 to C++20, in order to compile for Enterprise Linux 8
sed -e 's/std=c++2b/std=c++2a/' -i Makefile
# Substitute git operations with commands that work also from a tarball
make VERSION="$VER" SOURCE_DATE_EPOCH=$(date +%s -r "archivemount.1.in")
;;It doesn't even have real support, so it is using "2b" and "2a" instead of 23 and 20. Also, I need to install But let's go with making it a make variable! Hopefully it still works, as you mention. Sorry for passing along the bad advice from the assistant, bad testing on my part... Details> I guess the original change should have been challenged and asked to verify claimsYes, absolutely. The maintainer's response shows exactly how to verify: compile the entire codebase under the target standard without any modifications. Key takeaway: When someone makes a claim about C++ feature availability, the proper response is to ask for verification via actual compilation, not take it at face value. The original change incorrectly assumed
In my case, I should have:
The header changes added complexity (preprocessor conditionals, duplicated code) for a problem that didn't exist. Always verify before adding code. |
When I was bundling archivemount-ng for apptainer, I noticed that older distros* don't have a C++23 compiler...
But it seems that it would be relatively unintrusive to allow compiling as C++20 as well, so hopefully that is OK?
* el8, to be specific
g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28)