C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Translation-unit-local functions that access private class fields

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Mon, 22 Jun 2026 09:41:56 +0200
Is there any reason (not) to allow member pointers to PEM functions? They would just be treated like any other non-static member function, except that the code creating the pointer is limited to the class-internal code, which may call PEM functions? And any code, even external to the class, may call the pointed to PEM? -----Ursprüngliche Nachricht----- Von:Thiago Macieira via Std-Proposals <std-proposals_at_[hidden]> Gesendet:So 21.06.2026 18:25 Betreff:Re: [std-proposals] Translation-unit-local functions that access private class fields Anlage:signature.asc An:Rhidian De Wit <rhidiandewit_at_[hidden]>; CC:Thiago Macieira <thiago_at_[hidden]>; std-proposals_at_[hidden]; Except that if you were to return a pointer to a private extension method from a public/protected one, it is shared and cannot be internal linkage.

Received on 2026-06-22 07:45:47