When using this library with C++, there are apparently conflicts with some of the template functions. People are using "I" in C++ headers, which gets substituted with the _Complex_I macro. (It's truly a great mystery as to why the particular headers I'm using even include cmath, but I'll leave that for another project).
The easiest solution that I can think would be to have a compile-time switch that could disable the definition of I. In my initial sanity check, everything seems to compile/link fine - I build openlibm with I defined, and then remove the definition for my C++ project's build.
Before I head further down that route (with a potential PR), I wanted to know whether you foresee any difficulties arising from using this library in C++ with I undefined (or if you'd accept such a change at all).
When using this library with C++, there are apparently conflicts with some of the template functions. People are using "I" in C++ headers, which gets substituted with the
_Complex_Imacro. (It's truly a great mystery as to why the particular headers I'm using even includecmath, but I'll leave that for another project).The easiest solution that I can think would be to have a compile-time switch that could disable the definition of
I. In my initial sanity check, everything seems to compile/link fine - I build openlibm withIdefined, and then remove the definition for my C++ project's build.Before I head further down that route (with a potential PR), I wanted to know whether you foresee any difficulties arising from using this library in C++ with
Iundefined (or if you'd accept such a change at all).