no member named 'fill_n' in the global namespace; did you mean 'std::fill_n'
Summary
Environment
- Operating System : Linux
- Architecture : x64
- Eigen Version :
commit d34b100c137ac931379ae5e1b888f16a9c8d6c72 (HEAD)
Author: Charles Schlosser <cs.schlosser@gmail.com>
Date: Wed Nov 27 19:32:14 2024 +0000
Fix UB in setZero
- Compiler Version :
/usr/tce/packages/rocm/rocm-6.4.0alpha3/bin/amdclang++ --version
AMD clang version 20.0.0git (ssh://gerritgit/lightning/ec/llvm-project amd-staging 24371 986f979d075ccab39a6e5babbfd6db4723753bbf)
Target: x86_64-unknown-linux-gnu
Thread model: posix
- Compile Flags : -O3 -march=native
"CXX_STANDARD": "17",
Minimal Example
.../eigen3/Eigen/src/SparseCore/SparseMatrix.h:509:5: error: no member named 'fill_n' in the global namespace; did you mean 'std::fill_n'?
509 | EIGEN_USING_STD(fill_n);
| ^~~~~~~~~~~~~~~~~~~~~~~
.../eigen3/unsupported/Eigen/CXX11/../../../Eigen/src/Core/util/Macros.h:1081:37: note: expanded from macro 'EIGEN_USING_STD'
1081 | #define EIGEN_USING_STD(FUNC) using ::FUNC;
| ^~
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/algorithmfwd.h:275:5: note: 'std::fill_n' declared here
275 | fill_n(_OIter, _Size, const _Tp&);
| ^
1 error generated when compiling for gfx942.
Steps to reproduce
n/a
What is the current bug behavior?
Compilation failure.
What is the expected correct behavior?
Successful compilation