mreineck / ducc

Fork of https://gitlab.mpcdf.mpg.de/mtr/ducc to simplify external contributions
GNU General Public License v2.0
13 stars 12 forks source link

Fix required headers. #28

Closed cantonios closed 3 months ago

cantonios commented 3 months ago
cantonios commented 3 months ago

@mreineck, sorry, didn't test the last PR with latest changes on your end. Now that works.

mreineck commented 3 months ago

Thanks again! If you have any suggestions how I can automatically test for such issues, I'd love to hear them!

mreineck commented 3 months ago

I found that cstddef was also missing, which is needed (according to the standard) for max_align_t, so I added this as well.

cantonios commented 3 months ago

Thanks again! If you have any suggestions how I can automatically test for such issues, I'd love to hear them!

The only way to have detected the swap issue would be to increase code coverage for your tests. Depending on what your coverage currently is, it may or may not be worth it (we generally aim for about 90% coverage).

For the other headers: maybe you can add a test that uses "custom" threading - but really just replaces it with another version of std-threading.

We also currently see many warnings from clang's "include fixer" about headers not being directly included (though are included transitively), or unused headers. IWYU might work for this purpose as well.