mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 03:44:13 +08:00
mdbx++: добавление typename mdbx::default_allocator
.
This commit is contained in:
parent
bcebfb4b4c
commit
3ace3c27b8
3
mdbx.h++
3
mdbx.h++
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user