Debian Codegraph @

gcc/testsuite/g++.dg/modules/tpl-nttp-2_a.H

raw
1 // PR c++/119938
2 // { dg-additional-options "-fmodules -std=c++20" }
3 // { dg-module-cmi {} }
4
5 struct A { int x; };
6
7 template <A a> struct B { static_assert(a.x == 1); };
8 using C = B<A{1}>;
9
10 template <A a> void D() { static_assert(a.x == 2); };
11 inline void E() { D<A{2}>(); }
12
13 template <A a> struct F { static constexpr int result = a.x; };
14 template <int=0> constexpr int G() { return F<A{3}>::result; };