https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114600
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nshead at gcc dot gnu.org, | |ppalka at gcc dot gnu.org Keywords| |rejects-valid Target Milestone|--- |14.0 Blocks| |103524 Summary|[modules] redefinition |[14 Regression] [modules] |errors when using certain |redefinition errors when |std headers in GMF |using certain std headers | |in GMF Ever confirmed|0 |1 Last reconfirmed| |2024-04-05 Status|UNCONFIRMED |NEW --- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- Confirmed, started with r14-6978. Mechanical reduction: $ cat 114600.h namespace std { template <typename> struct integral_constant { typedef integral_constant type; }; template <bool> using __enable_if_t = int; template <typename> auto __and_fn() -> integral_constant<bool>; template <typename... _Bn> struct __and_ : decltype(__and_fn<_Bn...>) {}; template <typename... _Cond> using _Require = __enable_if_t<__and_<_Cond...>::value>; template <typename _Tp> _Require<_Tp> swap(); namespace __swappable_details { using std::swap; } } // namespace std $ cat 114600_a.C module; #include "114600.h" export module std; $ cat 114600_b.C import std; #include "114600.h" int main() { } $ g++ -fmodules-ts 114600_*.C 114600.h:3:29: error: template definition of non-template 'typedef struct std::integral_constant< <template-parameter-1-1> > std::integral_constant< <template-parameter-1-1> >::type' Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 [Bug 103524] [meta-bug] modules issue