Date: Fri, 3 Oct 2025 17:25:57 +0000 (UTC)
On Thursday, October 2, 2025 at 07:14:25 PM EDT, Thiago Macieira via Std-Proposals <std-proposals_at_[hidden]> wrote:
On Thursday, 2 October 2025 13:57:31 Pacific Daylight Time Walt Karas via Std-
Proposals wrote:
> This would have been nice to have for a class I'm currently working on. The
> only work-around I could to come up with was to make it a class template
> where the instantiations are singletons. The template takes a single
> (class) parameter. The only purpose of the template parameter is to create
> distinct instantiations, with distinct thread_local member variables.
You can already do this by having a static thread_local member or non-member
that is your data. It's a bit more typing, but I don't see this as a frequent
enough need to require direct language support.
Response: I don't understand what you mean by "that is your data".
On Thursday, 2 October 2025 13:57:31 Pacific Daylight Time Walt Karas via Std-
Proposals wrote:
> This would have been nice to have for a class I'm currently working on. The
> only work-around I could to come up with was to make it a class template
> where the instantiations are singletons. The template takes a single
> (class) parameter. The only purpose of the template parameter is to create
> distinct instantiations, with distinct thread_local member variables.
You can already do this by having a static thread_local member or non-member
that is your data. It's a bit more typing, but I don't see this as a frequent
enough need to require direct language support.
Response: I don't understand what you mean by "that is your data".
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center Group -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2025-10-03 17:26:02