C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Deprecating volatile polymorphic class types
From: Arthur O'Dwyer (arthur.j.odwyer_at_[hidden])
Date: 2020-01-09 15:40:18


On Thu, Jan 9, 2020 at 1:47 AM language.lawyer--- via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
> I find it weird that storage of objects of volatile polymorphic class
> types can be touched when a virtual function is invoked, which happens in
> all "typical" implementations which use vtables and vptrs stored in objects
> to implement polymorphic behavior.
> [...]
> What if we just deprecate volatile-qualified polymorphic class types (as
> well as [[pointers|references] to|arrays of] them)?
>

Sounds rational, but I also don't really see the point. `volatile` is like
`switch`: it sucks so much that nobody wants to touch it, not even to "fix"
it. Especially since your proposed change sounds like a new special case,
not a removal of special cases — your change would* increase* the length of
the paper standard, not decrease it.

If you want to pursue it, I recommend talking to JF Bastien, who may or may
not be interested in championing further "deprecating volatile" changes.
After his recent deprecations that got into C++2a, maybe the idea has
momentum, or maybe it's spent all its political capital, I'm not sure which.

HTH,
Arthur



STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups