libstdc++-v3/ChangeLog:
* src/c++23/std.compat.cc.in: Only export <stdbit.h> and
<stdckdint.h> contents for C++26 and later.
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-export module std.compat;
-export import std;
+module;
#include <stdbit.h>
+#include <stdckdint.h>
+
+export module std.compat;
+export import std;
+#ifdef __STDC_VERSION_STDBIT_H__
// <stdbit.h>
export
{
_GLIBCXX_STDBIT_FUNC(stdc_bit_ceil);
#undef _GLIBCXX_STDBIT_FUNC
}
+#endif
+#ifdef __STDC_VERSION_STDCKDINT_H__
// <stdckdint.h>
export
{
using __gnu_cxx::ckd_sub;
using __gnu_cxx::ckd_mul;
}
+#endif
#define STD_COMPAT 1