std::pmr::u...ol_resource(3)
π NAME π
Yo bestie, welcome to std::pmr::u...ol_resource(3) π This page is from the C++ Standard Libary manual (yes, that's literally how the header spells it β not me, I'm just the messenger π), and the full name on the cover is:
std::pmr::unsynchronized_pool_resource::unsynchronized_pool_resource
It's giving "constructor of the pool resource" energy, and we're about to get into every overload. Periodt.
β¨ Synopsis β¨
All five overloads are since C++17, and the exact lineup is:
unsynchronized_pool_resource();
(1) (since C++17)
explicit unsynchronized_pool_resource( std::pmr::memory_resource*
(2) (since C++17)
upstream );
explicit unsynchronized_pool_resource( const
(3) (since C++17)
std::pmr::pool_options& opts );
unsynchronized_pool_resource( const std::pmr::pool_options& opts,
std::pmr::memory_resource* upstream
(4) (since C++17)
);
unsynchronized_pool_resource( const unsynchronized_pool_resource&
(5) (since C++17)
) = delete;
Overloads (1)β(4) construct an unsynchronized_pool_resource using the specified upstream memory resource and tuned according to the specified options. The resulting object holds a copy of upstream but does not own the resource to which upstream points β write that down, bestie, it's important π«Ά
The overloads that don't take opts as a parameter use a default constructed instance of pool_options as the options. The overloads that don't take upstream as a parameter use the return value of std::pmr::get_default_resource() as the upstream memory resource β¨
Overload (5) is the copy constructor, and it is = delete β as in, deleted. No copying. Not today. π
π Parameters π
optsβ astd::pmr::pool_optionsstruct containing the constructor options πupstreamβ the upstream memory resource to use π¦
πΈ Exceptions πΈ
For overloads (1)β(4), it throws only if a call to the allocate() function of the upstream resource throws.
π«Ά heads up: it is unspecified if or under what conditions such a call takes place.
That's the whole exception vibe check β no extra drama, no cap.
Source/version/date sign-off: http://cppreference.com β’ 2024.06.10 β’ page std::pmr::u...ol_resource(3) β bye bestie, mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms