Debian Codegraph @

gcc/testsuite/g++.dg/template/explicit-instantiation8.C

raw
1 // PR c++/109464
2 // { dg-do compile { target c++11 } }
3
4 template<typename T>
5 struct shallow
6 {
7 int len;
8 constexpr shallow() : len(0) { }
9 };
10
11 template<typename T>
12 struct use_shallow
13 {
14 static constexpr shallow<T> s_zstr = { };
15 static_assert(s_zstr.len == 0, "");
16 };
17
18 extern template struct shallow<char>;
19 extern template struct use_shallow<char>;
20
21 template struct shallow<char>;
22 template struct use_shallow<char>;
23
24 // { dg-final { scan-assembler "_ZN7shallowIcEC2Ev" } }