Bug#1120951: marked as done (g++-15: Compilation error about class not being a non-union class type for valid C++ code)

"Debian Bug Tracking System" <[email protected]> Mon, 13 Jul 2026 09:59:01 +0000
Newsgroups gmane.linux.debian.devel.gcc
Message-ID <handler.1120951.D1120951.17839366271338502.ackdone@bugs.debian.org>
This is a multi-part message in MIME format...

------------=_1783936741-1339922-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Your message dated Mon, 13 Jul 2026 11:57:03 +0200
with message-id <[email protected]>
and subject line fixed in 15.3.0
has caused the Debian Bug report #1120951,
regarding g++-15: Compilation error about class not being a non-union class=
 type for valid C++ code
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


--=20
1120951: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D1120951
Debian Bug Tracking System
Contact [email protected] with problems

------------=_1783936741-1339922-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by bugs.debian.org; 18 Nov 2025 18:42:23 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
	(2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-20.1 required=4.0 tests=BAYES_00,
	BODY_INCLUDES_PACKAGE,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,
	DKIM_VALID_EF,FOURLA,HAS_PACKAGE,MD5_SHA1_SUM,SPF_HELO_NONE,SPF_PASS,
	XMAILER_REPORTBUG autolearn=ham autolearn_force=no
	version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 41; hammy, 150; neutral, 135; spammy,
	0. spammytokens: hammytokens:0.000-+--sk:buildd.,
	0.000-+--UD:buildd.debian.org, 0.000-+--buildddebianorg,
	0.000-+--buildd.debian.org, 0.000-+--H*x:12.0.0
Return-path: <[email protected]>
Received: from mail.dr-blatt.de ([2a01:238:43cb:6800:fab4:d224:cb4c:fdf9]:39166)
	by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
	(Exim 4.96)
	(envelope-from <[email protected]>)
	id 1vLQek-00Ffqb-39
	for [email protected];
	Tue, 18 Nov 2025 18:42:23 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dr-blatt.de
	; s=20190301; h=Date:Message-ID:Subject:To:From:Content-Transfer-Encoding:
	MIME-Version:Content-Type:Sender:Reply-To:Cc:Content-ID:Content-Description:
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
	In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
	List-Post:List-Owner:List-Archive;
	bh=QWMypnuyDdcR9ypigFoTiWvH9mTV2Ps1udvc1PEqe4I=; b=gVaMm2kUhF8p7WpOKpQKm9drC7
	NL++tjMm7orfmLJiMMJnnFBcz+NI0jd1TELrjjqk3cCFm5PqEQBgo4KMfs1OaJxd8XgDMs7mSWLfQ
	sZlNNHMod/P14g6WkcPVk+T5VEe76stroPfsTicU/NaVuIUEaA4qUdkJDz4W7/+RQuu8=;
Received: from [2a02:8106:21d:f700:7403:a7f8:5f25:d07c] (helo=frau-mahlzahn.fritz.box)
	by mail.dr-blatt.de with esmtpsa  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
	(Exim 4.96)
	(envelope-from <[email protected]>)
	id 1vLQNt-0016QG-2q;
	Tue, 18 Nov 2025 19:24:57 +0100
Received: from mblatt by frau-mahlzahn.fritz.box with local (Exim 4.96)
	(envelope-from <[email protected]>)
	id 1vLQNt-003xy7-1J;
	Tue, 18 Nov 2025 19:24:57 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Markus Blatt <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: g++-15: Compilation error about class not being a non-union class type for valid C++ code
Message-ID: <176349029740.935681.13301472264724354397.reportbug@frau-mahlzahn.dr-blatt.de>
X-Mailer: reportbug 12.0.0
Date: Tue, 18 Nov 2025 19:24:57 +0100
X-Greylist: delayed 1034 seconds by postgrey-1.37 at buxtehude; Tue, 18 Nov 2025 18:42:22 UTC
Delivered-To: [email protected]

Package: g++-15
Version: 15.2.0-8
Severity: important
Tags: upstream

Dear Maintainer,

the recently uploaded version of g++ caused compilation errors in some packages
during rebuils, e.g. opm-simulators [1].

This simple C++ program fails to compile:

#include <set>

template <class S>
class A
{
  typedef S VertexSet;

public:
  typename VertexSet::size_type size();

private:
  VertexSet vertices_;
};

template <class S>
inline typename A<S>::VertexSet::size_type A<S>::size()
{
  return vertices_.size();
}

int main()
{
  A<std::set<int>> a;
  return a.size();
}

with the error:

<source>:16:55: error: 'class A<S>::VertexSet' resolves to 'A<S>::VertexSet',
which is not a non-union class type [-Wtemplate-body]
   16 | inline typename A<S>::VertexSet::size_type A<S>::size()
      |                                                       ^
Compiler returned: 1

See also [2].

The expected outcome would be that the program compiles without any errors.

One can work around this problem by defining a typename size_type for
VertexSet::size_type and using that instead. A similar fix has been applied to
dune-istl in [3]

Best,

Markus

[1] https://buildd.debian.org/status/fetch.php?pkg=opm-
simulators&arch=loong64&ver=2025.10%2Bds-1%2Bb1&stamp=1763168796&raw=0
[2] https://godbolt.org/z/xodooafea
[3] https://salsa.debian.org/science-team/dune-
istl/-/commit/51fedd3623c511f79ef5c2c6321fb62b9c08b5cf


-- System Information:
Debian Release: 12.12
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-40-amd64 (SMP w/64 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

------------=_1783936741-1339922-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 1120951-done) by bugs.debian.org; 13 Jul 2026 09:57:07 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
	(2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=BAYES_00,FORGED_SPF_HELO,
	FROMDEVELOPER,KHOP_HELO_FCRDNS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,
	SPF_HELO_PASS,SPF_SOFTFAIL,VERSION autolearn=ham autolearn_force=no
	version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 16; hammy, 68; neutral, 15; spammy, 0.
	spammytokens: hammytokens:0.000-+--H*F:U*doko,
	0.000-+--H*RU:sk:einhorn, 0.000-+--H*r:sk:einhorn,
	0.000-+--H*r:[email protected],
	0.000-+--Hx-spam-relays-external:sk:einhorn
Return-path: <[email protected]>
Received: from einhorn.in-berlin.de ([192.109.42.8]:36213 helo=einhorn-mail-out.in-berlin.de)
	by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
	(Exim 4.96)
	(envelope-from <[email protected]>)
	id 1wjDPP-005cCG-1P
	for [email protected];
	Mon, 13 Jul 2026 09:57:07 +0000
X-Envelope-From: [email protected]
X-Envelope-To: <[email protected]>
Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de  with ESMTPSA id 66D9v3C12255834
        (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT)
        for <[email protected]>; Mon, 13 Jul 2026 11:57:04 +0200
Message-ID: <[email protected]>
Date: Mon, 13 Jul 2026 11:57:03 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: [email protected]
From: Matthias Klose <[email protected]>
Subject: fixed in 15.3.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Version: 15.3.0-1
------------=_1783936741-1339922-0--