C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Decouple constness for inherited interfaces
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-09-21 14:52:35


On Friday, 20 September 2019 20:50:56 PDT Lior Lahav via Std-Discussion wrote:
> It would be logical that a pure abstract class const correctness would be
> decoupled from an implementation and should not dictate whether derived
> class should have side effects.

Except for the cases where the interface explicitly wants that any and all
derived classes should have no side-effects. How should one write such a
declaration (in the base class) that guarantees this contract?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

STD-DISCUSSION list run by herb.sutter at gmail.com

Older Archives on Google Groups