From 01f34d0b0bfd869196c80026e2d9692a47cfbeeb Mon Sep 17 00:00:00 2001 From: Daniela Engert Date: Wed, 6 Feb 2019 08:37:03 +0100 Subject: [PATCH] Fix library deprecation warning Since C++17, using template specialization 'std::allocator' in any shape or form (even just mentioning it) is deprecated! A simple workaround is replacing 'void' by another (preferably empty) type, e.g. 'fmt::monostate'. Found by Clang 9 in Visual Studio. --- test/prepare-test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/prepare-test.cc b/test/prepare-test.cc index 647db5db..e40b6b45 100644 --- a/test/prepare-test.cc +++ b/test/prepare-test.cc @@ -618,8 +618,9 @@ template struct user_allocator { ~user_allocator() = default; template user_allocator(const user_allocator&) {} - pointer allocate(size_type cnt, - typename std::allocator::const_pointer = FMT_NULL) { + pointer allocate( + size_type cnt, + typename std::allocator::const_pointer = FMT_NULL) { return new value_type[cnt]; }