Skip to content

Better C++ support (std::complex) #254

@maazl

Description

@maazl

Using fftw3 in a C++ application requires thunking layers because the array data type R C[2] is not compatible to std::complex at language level. They are guaranteed to be binary compatible, but C++ does not even allow casts between arrays and classes.
So pointer conversions are required at several places. This makes the code poorly readable, error prone and may even prevent some compiler optimizations due to the required reinterpret casts.

It should be possible to force fftw3.h to use std::complex similar to the support for C99 _Complex.

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