Title
sizeof(abstract class) is underspecified
Status
open
Section
7.6.2.5 [expr.sizeof]
Submitter
Jiang An

Created on 2023-02-23.00:00:00 last changed 14 months ago

Messages

Date: 2023-10-22.11:12:03

Subclause 7.6.2.5 [expr.sizeof] paragraph 1 specifies:

The sizeof operator yields the number of bytes occupied by a non-potentially-overlapping object of the type of its operand. The operand is either an expression, which is an unevaluated operand (7.2.3 [expr.context]), or a parenthesized type-id. ...

Since an abstract class can be used only in a situation where it is a potentially-overlapping object, it is unclear what its size is.

History
Date User Action Args
2023-02-23 00:00:00admincreate