C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Suggestion: non-static member variables for static-duration-only classes

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Tue, 7 Oct 2025 08:26:59 +0000
On Sunday, October 5, 2025, Frederick Virchanza Gotham wrote:
>
>
>
>
>
> Again this code hasn't been ruminated over again and again, but
> something along the lines of this:
>
> https://gcc.godbolt.org/z/6KK8oafcd
>
>



Also take a look at boost::thread_specific_ptr and Poco::ThreadLocal.


https://www.boost.org/doc/libs/1_34_1/doc/html/boost/thread_specific_ptr.html

https://docs.pocoproject.org/current/Poco.ThreadLocal.html

You could probably take the implementations of these classes, feed them
into an LLM and ask it to remove the dynamic memory allocation (e.g.
replace it with a pool).

Received on 2025-10-07 08:27:06