Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
library uses the <<ref_storage_ptr>> allocator model, has the same interface on all C++ versions, and has an optimized class layout to keep the size of JSON values small. <<ref_string>> also implements an improved interface that replaces extraneous overloads with ones that use <<ref_string_view>>."为什么使用 <<ref_storage_ptr>> 而不是 {ref_polymorphic_allocator}?:: {ref_polymorphic_allocator} 将内存资源视为所有权的引用。Boost.JSON 使用一个引用计数智能指针容器来简化内存资源的生命周期管理。除了引用计数外,<<ref_storage_ptr>> 还可以作为围绕 {ref_memory_resource} 的非计数引用包装器。</ref_storage_ptr></ref_storage_ptr>