Skip to content

Create a compiler flag to disable the definition of I #191

@phillipjohnston

Description

@phillipjohnston

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions