Project

General

Profile

cdo-2.4.0 error: namespace "std" has no member "ranges"

Added by Benjamin Cash 14 days ago

Hello,

My make of cdo-2.4.0 failed with the error in the subject line. The full line is:

/opt/intel/oneapi/compiler/2023.1.0/linux/bin/intel64/icpc -std=gnu++20 -DHAVE_CONFIG_H -I. -I../libcdi/src -I../src/mpim_grid -DYAC_FOR_CDO -I/work2/01118/tg803972/frontera/spack-stack/spack-stack-1.6.0/envs/unified-env/install/intel/23.1.0/netcdf-c-4.9.2-kohydth/include -I/work2/01118/tg803972/frontera/spack-stack/spack-stack-1.6.0/envs/unified-env/install/intel/23.1.0/netcdf-c-4.9.2-kohydth/include -DgFortran -DCDI_SIZE_TYPE=size_t -diag-disable=10441 -fopenmp -pthread -MT cdo-cdo.o -MD -MP -MF .deps/cdo-cdo.Tpo -c -o cdo-cdo.o `test -f 'cdo.cc' || echo './'`cdo.cc
In file included from ../src/mpim_grid/mpim_grid.h(21),
from cdo.cc(42):
./varray.h(18): error: namespace "std" has no member "ranges"
namespace ranges = std::ranges;

Any suggestions as to where this might be coming from would be welcome!


Replies (1)

RE: cdo-2.4.0 error: namespace "std" has no member "ranges" - Added by Uwe Schulzweida 13 days ago

Hello Benjamin,

std::ranges is part of the C++20 standard. The deprecated Intel compiler icpc doesn't fully support the C++20 standard.
Use the new Intel compiler icpx instead. If this is not available, you can also use GNU g++ or clang++.

Cheers,
Uwe

    (1-1/1)