mdbx++: добавление typename mdbx::default_allocator.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2023-04-01 11:10:40 +03:00
parent bcebfb4b4c
commit 3ace3c27b8
2 changed files with 4 additions and 1 deletions

View File

@ -356,6 +356,9 @@ class cursor_managed;
__cpp_lib_memory_resource >= 201603L && _GLIBCXX_USE_CXX11_ABI)
/// \brief Default polymorphic allocator for modern code.
using polymorphic_allocator = ::std::pmr::string::allocator_type;
using default_allocator = polymorphic_allocator;
#else
using default_allocator = legacy_allocator;
#endif /* __cpp_lib_memory_resource >= 201603L */
/// \brief Default singe-byte string.

View File

@ -13,7 +13,7 @@ int main(int argc, const char *argv[]) {
mdbx::env::operate_parameters());
using buffer =
mdbx::buffer<mdbx::polymorphic_allocator, mdbx::default_capacity_policy>;
mdbx::buffer<mdbx::default_allocator, mdbx::default_capacity_policy>;
auto txn = env.start_write();
auto map = txn.create_map(nullptr, mdbx::key_mode::ordinal,
mdbx::value_mode::single);