C++ Logo


Advanced search

Re: Decouple constness for inherited interfaces

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sat, 21 Sep 2019 12:52:35 -0700
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

Received on 2019-09-21 14:54:45