std::pmr::s...ol_resource(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’– β€” std::pmr::synchronized_pool_resource::synchronized_pool_resource, manual page std::pmr::s...ol_resource(3) πŸŽ€

okay so bestie, this is the page for std::pmr::synchronized_pool_resource::synchronized_pool_resource from the C++ Standard Libary (their spelling, not mine πŸ’…), and it is literally the constructor for a synchronized_pool_resource. The name is a whole mouthful, but the manual tag is std::pmr::s...ol_resource(3) β€” that's how you find it. slay.


🌸 Synopsis 🌸

Here is the synopsis, verbatim, because we do not mess with signatures in this group chat:

          synchronized_pool_resource();
       (1) (since C++17)
          explicit synchronized_pool_resource( std::pmr::memory_resource*
       (2) (since C++17)
          upstream );
          explicit synchronized_pool_resource( const std::pmr::pool_options&
       (3) (since C++17)
          opts );
          synchronized_pool_resource( const std::pmr::pool_options& opts,
       (4) (since C++17)
                                      std::pmr::memory_resource* upstream );
          synchronized_pool_resource( const synchronized_pool_resource& ) =
       (5) (since C++17)
          delete;

so what's the vibe? It constructs a synchronized_pool_resource. That's the whole assignment. πŸ’…

  • 1-4) β€” Constructs a synchronized_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. The overloads not taking opts as a parameter uses a default constructed instance of pool_options as the options. The overloads not taking upstream as a parameter uses the return value of std::pmr::get_default_resource as the upstream memory resource.
  • 5) β€” Copy constructor is deleted.

πŸŽ€ Parameters πŸŽ€

  • opts β€” a std::pmr::pool_options struct containing the constructor options
  • upstream β€” the upstream memory resource to use

πŸ’€ Exceptions πŸ’€

  • 1-4) β€” Throws only if a call to the allocate() function of the upstream resource throws. It is unspecified if or under what conditions such a call takes place.
bestie, that "unspecified" part is important: the standard is not giving us a neat little answer about exactly when that upstream allocate() call happens, and we are not gonna invent one. periodt. πŸ’€

πŸ’– that's the whole page! source shoutout: http://cppreference.com, version/date stamp: 2024.06.10, and the manual tag is std::pmr::s...ol_resource(3) β€” now go construct something iconic, bestie. πŸ¦‹βœ¨

πŸ“¦ where this page comes from