Module interface of M:void g(); // #1 void h(); // #2 template <typename T> int j; // #3
Module interface of N:int g(); // same entity as #1, different type namespace h {} // same entity as #2, not both namespaces template <int X> int j; // same entity as #3, non-equivalent template heads
Other translation unit:import M; import N; // IFNDR due to the mismatched pairs above — end example]
Translation unit #1:struct S; consteval { std::meta::define_aggregate(^^S, {}); } // #1
Translation unit #2:struct S {}; // IFNDR, definition here, injected declaration at #1 — end example]
Translation unit #1:export module M:A; // module partition void f() {} // #1 void g() {} // #2
Translation unit #2:export module M:B; // module partition void f() {} // IFNDR, #1 not reachable
Translation unit #3:export module M; // primary module interface unit export import :A; void g(); // error: #2 is reachable — end example]
Translation unit #1:inline void f() {} // #1 inline void g() {} // #2 inline void h() {[]{}();} // #3 namespace { int i = 0; } inline void j() {++i;} // #4
Translation unit #2:inline void f() {} // OK, same as #1 inline void g() {;} // IFNDR, different sequence of tokens than #2 inline void h() {[]{}();} // IFNDR, closure has different type than #3 namespace { int i = 0; } inline void j() {++i; } // IFNDR, i refers to different entity than in #4 — end example]
Source file "a.h":enum { a };
Source file "b.h":enum { a, b };
Source file "main.cpp":import "a.h"; import "b.h"; auto n = decltype(a)::b; // IFNDR, more than one unnamed enum definition reachable at // this point but their types are not the same — end example]