Skip to content

CMake option DEFINE_ARITHMETIC_OVERLOADS cannot be disabled #686

@TysonRayJones

Description

@TysonRayJones

After PR #685, a user setting CMake option DEFINE_ARITHMETIC_OVERLOADS to OFF will not only prevent the overloads in their own source (as intended), but also prevent them during compilation of the QuEST source. This crashes compilation since the source contains arithmetic between qcomp and integer literals, like here:

qcomp fac0 = (isGadget)? std::exp(+ phase * sign * 1_i) : +1 * sign;
qcomp fac1 = (isGadget)? std::exp(- phase * sign * 1_i) : -1 * sign;

Note that no issue has yet been witnessed from users being exposed to the relevant arithmetic overloads, and the original macro to disable it was hastily written just in case. As such, this bug is so incredibly important, and we might as well just delete DEFINE_ARITHMETIC_OVERLOADS.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions