
13 Jan
2025
13 Jan
'25
7:37 p.m.
Ruben Perez wrote:
I think this applies for non module units, too. I've just tested that, under MSVC, the following errors:
// File: main.cpp import std; #include <cstddef> int main() {}
This does not seem to happen with all the headers, though. * version, cstdint, climits, cassert, cfloat, cstdio, cstdlib, cerrno seem to work fine * cmath and cstddef seem to error.
So if we have in a program:
// File: main.cpp #include <boost/mp11.hpp> #include <boost/charconv.hpp> int main() {}
Yeah, that's going to be a problem. Interestingly, though, import std; #include <math.h> #include <stddef.h> int main() {} works fine. If we only need these for the macros, this might well work. (It's probably std::byte from cstddef that breaks things.)