Debian Codegraph @

gcc/testsuite/g++.dg/modules/pr99377_a.H

raw
1 // PR 99377 failed to stream locally instantiated member
2 // link failure in function `Check(Widget<int> const&)':
3 // bug_c.ii:(.text._Z5CheckRK6WidgetIiE[_Z5CheckRK6WidgetIiE]+0x14): undefined reference to `Widget<int>::Second() const'
4 // { dg-module-do link }
5 // { dg-additional-options -fmodule-header }
6 // { dg-module-cmi {} }
7 template<typename>
8 struct Widget
9 {
10 Widget (int) { }
11
12 bool First() const { return true; }
13
14 bool Second () const { return true;}
15 };
16
17 inline void Frob (const Widget<int>& w) noexcept
18 {
19 w.First ();
20 }
21