// { dg-additional-options "-fmodules-ts -std=c++20" } export module M; // { dg-module-cmi M } export template struct traits { static constexpr int variant = 0; }; // #2 template requires requires { typename T2::element_type; } struct traits { using type = typename T2::element_type; static constexpr int variant = 2; }; // #1 template struct traits { using type = T1; static constexpr int variant = 1; }; // #3 template requires requires { typename T3::value_type; } struct traits { using type = typename T3::value_type; static constexpr int variant = 3; };