diff --git a/mdbx.h++ b/mdbx.h++ index 470c0311..2fa81f43 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -210,13 +210,13 @@ class txn; class cursor_ref; class cursor; -using default_allocator = ::std::string::allocator_type; +using legacy_allocator = ::std::string::allocator_type; #if defined(DOXYGEN) || \ defined(__cpp_lib_memory_resource) && __cpp_lib_memory_resource >= 201603L using polymorphic_allocator = ::std::pmr::string::allocator_type; #endif /* __cpp_lib_memory_resource >= 201603L */ -template +template using string = ::std::basic_string, ALLOCATOR>; using filehandle = ::mdbx_filehandle_t; @@ -469,7 +469,7 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val { #endif /* __cpp_lib_string_view >= 201606L */ template , - class A = default_allocator> + class A = legacy_allocator> cxx20_constexpr ::std::basic_string string(const A &allocator = A()) const { static_assert(sizeof(C) == 1, "Must be single byte characters"); @@ -516,25 +516,25 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val { return (length() + 3) / 4 * 3; } - template + template inline ::mdbx::string hex_encode(bool uppercase = false, const ALLOCATOR &allocator = ALLOCATOR()) const; - template + template inline ::mdbx::string hex_decode(const ALLOCATOR &allocator = ALLOCATOR()) const; - template + template inline ::mdbx::string base58_encode(const ALLOCATOR &allocator = ALLOCATOR()) const; - template + template inline ::mdbx::string base58_decode(const ALLOCATOR &allocator = ALLOCATOR()) const; - template + template inline ::mdbx::string base64_encode(const ALLOCATOR &allocator = ALLOCATOR()) const; - template + template inline ::mdbx::string base64_decode(const ALLOCATOR &allocator = ALLOCATOR()) const; @@ -627,7 +627,7 @@ protected: /// Container of a value, which could be stored inside internal silo /// or be a reference to an external stored one. -template class buffer { +template class buffer { friend class txn_ref; using silo = ::mdbx::string; silo silo_; @@ -1043,7 +1043,7 @@ public: } template , - class A = default_allocator> + class A = legacy_allocator> cxx20_constexpr ::std::basic_string string(const A &allocator = A()) const { return slice_.string(allocator); diff --git a/src/mdbx.c++ b/src/mdbx.c++ index c1613d70..04c4fade 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -1005,7 +1005,7 @@ bool slice::is_base64(bool ignore_spaces) const noexcept { //------------------------------------------------------------------------------ -template class LIBMDBX_API_TYPE buffer; +template class LIBMDBX_API_TYPE buffer; #if defined(__cpp_lib_memory_resource) && __cpp_lib_memory_resource >= 201603L template class LIBMDBX_API_TYPE buffer;