C++ Logo

std-proposals

Advanced search

Re: Partial type definition

From: Olaf van der Spek <ml_at_[hidden]>
Date: Tue, 24 Aug 2021 20:41:30 +0200
On Tue, Aug 24, 2021 at 6:24 PM Thiago Macieira via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On Monday, 23 August 2021 22:00:16 PDT Valery Osheter via Std-Proposals wrote:
> > I just want the compuler knows that my class has some public methods before
> > I define whole class structure. The same is right for deduced this as well.
> > The method of partial declaration I proposed uses extern keyword without
> > variable declaration. If you think this method leads to misuse and errors,
> > I can propose an alternative:
> >
> > struct worker;
> > void worker::work();
>
> You did not address my point. Do we need another method of declaring methods
> that can be called in an object without defining the entire object, in the
> presence of deduced this?

Deduced this doesn't allow one to keep implementation details fully
private AFAIK.


-- 
Olaf

Received on 2021-08-24 13:41:44