C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Specify the mangled name

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 03 Feb 2025 07:52:02 -0800
On Monday 3 February 2025 03:13:58 Pacific Standard Time Andrey Semashev via
Std-Proposals wrote:
> > When compiling the above source file, the compiler emits a mangled
> > name for the function "NormaliseIndexSet". But in order to be able to
> > do this, the full definition of the template class "std::set" is
> > required inside the translation unit.
>
> It is not. A forward declaration would suffice.

It would, except you can't get one because it's a Standard Library type. Only
the Standard Library can provide those and it doesn't.

A <containerfwd> header would be very helpful.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2025-02-03 15:52:08