C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow const / static / noexcept / virtual / override after member access specifier

From: Thiago Macieira <thiago_at_[hidden]>
Date: Fri, 17 Jul 2026 06:59:35 -0700
On Thursday, 16 July 2026 11:27:13 Pacific Daylight Time Walt Karas via Std-
Proposals wrote:
> My thinking was that virtual following the access specifier would be moot
> for member variables

Virtual member variables may be a thing in the future, so no, this should not
be allowed.

I can't think of what a virtual member would be, but a virtual constexpr
member has been discussed in the past and has a logical meaning of something
stored in the vtable.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-07-17 13:59:41