Date: Mon, 22 Jun 2026 12:21:42 +0000
Since C does not have namespaces, these libraries use internal linkage to avoid symbol conflicts. However, in C++, especially when writing modules, this is entirely unnecessary. These libraries can detect __cplusplus or some specific macro and drop static accordingly, without breaking existing code.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Rainer Deyke via Std-Proposals <std-proposals_at_[hidden]>
Sent: Monday, June 22, 2026 20:04
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Rainer Deyke <rainerd_at_[hidden]>
Subject: Re: [std-proposals] Proposal: Deprecate namespace-scope declarations that are declared both static and inline
On 6/22/26 13:23, Yexuan Xiao via Std-Proposals wrote:
> It seems that some C code likes to use static inline to indicate that a function should be inlined, but this is inconsistent with C++ conventions.
Given that the C code already exists and is already used from C++,
wouldn't it make more sense to give the C code C-like semantics in C++?
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Rainer Deyke via Std-Proposals <std-proposals_at_[hidden]>
Sent: Monday, June 22, 2026 20:04
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Rainer Deyke <rainerd_at_[hidden]>
Subject: Re: [std-proposals] Proposal: Deprecate namespace-scope declarations that are declared both static and inline
On 6/22/26 13:23, Yexuan Xiao via Std-Proposals wrote:
> It seems that some C code likes to use static inline to indicate that a function should be inlined, but this is inconsistent with C++ conventions.
Given that the C code already exists and is already used from C++,
wouldn't it make more sense to give the C code C-like semantics in C++?
-- Rainer Deyke - rainerd_at_[hidden] -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2026-06-22 12:21:48
