On Wed, 24 Jan 2024 at 12:01, Jonathan Wakely wrote: > > On Tue, 23 Jan 2024 at 23:54, Patrick Palka wrote: > > diff --git a/libstdc++-v3/include/bits/stl_pair.h > > b/libstdc++-v3/include/bits/stl_pair.h > > index b81b479ad43..a9b20fbe7ca 100644 > > --- a/libstdc++-v3/include/bits/stl_pair.h > > +++ b/libstdc++-v3/include/bits/stl_pair.h > > @@ -85,12 +85,70 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > /// @cond undocumented > > > > // Forward declarations. > > + template<typename, typename> > > + struct pair; > > We have a compiler bug where a forward declaration without template > parameter names causes bad diagnostics later. The compiler seems to > try to use the parameter names from the first decl it sees, so we end > up with things like <template-argument-1-1> even when there's a name > available at the site of the actual error. So I think we should name > these _T1 and _T2 here.
The bug I'm thinking of is https://gcc.gnu.org/PR54948