Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Workarounds for this problem are worse than the problem itself. The library could return a pair with the针对此问题的变通方案往往比问题本身更糟糕。该库可以返回一个包含 vectorand和`std::unique_ptr<std::pmr::memory_resource>`which the caller must manage. Or the library could change its function signatures to accept a {ref_memory_resource}``*`` provided by the caller, where the library also makes public the desired memory resources (`my_resource` above).的pair,必须由调用方自行管理。或者,该库也可以修改其函数签名,接受调用方提供的{ref_memory_resource}``*``,同时将所需的内存资源(如上文的`my_resource`)公开。</std::pmr::memory_resource>