diff --git a/src/json.hpp b/src/json.hpp index b0c85dc1..ba533ccc 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -8028,7 +8028,6 @@ class basic_json static T* create(Args&& ... args) { AllocatorType alloc; - using AllocatorTraits = std::allocator_traits>; auto deleter = [&](T * object) @@ -10719,8 +10718,8 @@ class basic_json if (is_string()) { AllocatorType alloc; - alloc.destroy(m_value.string); - alloc.deallocate(m_value.string, 1); + std::allocator_traits::destroy(alloc, m_value.string); + std::allocator_traits::deallocate(alloc, m_value.string, 1); m_value.string = nullptr; } @@ -10825,8 +10824,8 @@ class basic_json if (is_string()) { AllocatorType alloc; - alloc.destroy(m_value.string); - alloc.deallocate(m_value.string, 1); + std::allocator_traits::destroy(alloc, m_value.string); + std::allocator_traits::deallocate(alloc, m_value.string, 1); m_value.string = nullptr; }