C++ Logo

std-proposals

Advanced search

Re: Partial type definition

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 23 Aug 2021 14:08:34 -0700
On Sunday, 22 August 2021 05:27:12 PDT Valery Osheter via Std-Proposals wrote:
> The compiler allows the forward declaration of a type name only. The type
> name then can be used as a reference or a pointer only. If we want to call
> a method of this type, a complete type definition is required. I understand
> that this requirement comes from the storage details. But this compiler's
> restriction is unnecessery for static and non-virtual methods, and other
> things that are not related to the instance data.

Before we go further, please make sure that your request takes
https://wg21.link/p0847 into consideration: in a C++ world with deduced this,
do we need extern struct?

Also, mind you,

extern struct worker
{
  void work();
};

and

extern struct worker
{
  void work();
} s;

Have VERY different meanings.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2021-08-23 16:08:40