What is the cmake_minimum_required call for the project you’re building? Is it setting the C++ standard to 20 or newer?
cmake_minimum_required