You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following C++23 code is rejected by clang version 20.1.6, saying that the declaration of S is unreachable in I.cpp.
// H.hpp
struct S{};
// M.cppm
export module M;
// P.cppm
module;
#include "H.hpp"
module M:P;
using T = S;
// I.cpp
module M;
import :P;
T f() { return {}; }
A variation involving no module partitions is accepted, and I do not find a reason for the rejection in the standard. My reading of 10.4 and 10.7 is that the definition is reachable, with emphasis on 10.4.3.1 and 10.7.3.2.