Skip to content

Make the code compile under GCC7 (x86_64 linux)

Maurizio Tomasi requested to merge gcc7-patch into ducc0

ducc0 produces the following error when compiled with GCC7:

In file included from ducc0/healpix/healpix_base.cc:32:0:
./ducc0/healpix/healpix_base.h:416:28: error: ‘std::array’ has not been declared
     void neighbors (I pix, std::array<I,8> &result) const;
                            ^~~

Although I believe there are other problems that might make the compilation with GCC7 hard (e.g., the lack of aligned_alloc), this problem is easy to solve with the attached patch. (It includes <cmath> as well, as the header file uses std::fabs and std::sqrt.)

Merge request reports