Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix C++ portability issue with using CMPLX (#24211)
[reviewed by @mppf] Though compiling PR #24184 with a back-end C++ compiler worked on my laptop and [redacted], it caused problems with other C++ compilers, like g++ (SUSE Linux) 7.5.0 on [redacted] and some of our other nightly testing configurations. At present, it's somewhat circumstantial that we compile this code with a C++ compiler at all: It only happens when compiling our qio re2 shim code, and that code doesn't rely on these tuple-to-complex conversion routines anyway. As a result, what I've done here is to beef up my #ifndef to skip over the new preferred path of code when we're compiling for C++ to be safe, and on the assumption that it doesn't really matter anyway (won't be called); and even if that changes in the future, the fallback paths from #24184 ought to work... (As potentiall future work, we could also refactor our header files so that the re2 shim only gets definitions that it truly needs, which probably would involve forking some portions of chpltypes.h out of it and into another header. I started into this as part of #24184 before deciding it was overkill for that PR).
- Loading branch information