mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-12 06:37:28 +00:00
Fix library deprecation warning
Since C++17, using template specialization 'std::allocator<void>' 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.
This commit is contained in:
parent
9a0a24f90b
commit
01f34d0b0b
@ -618,8 +618,9 @@ template <typename T> struct user_allocator {
|
|||||||
~user_allocator() = default;
|
~user_allocator() = default;
|
||||||
template <typename U> user_allocator(const user_allocator<U>&) {}
|
template <typename U> user_allocator(const user_allocator<U>&) {}
|
||||||
|
|
||||||
pointer allocate(size_type cnt,
|
pointer allocate(
|
||||||
typename std::allocator<void>::const_pointer = FMT_NULL) {
|
size_type cnt,
|
||||||
|
typename std::allocator<fmt::monostate>::const_pointer = FMT_NULL) {
|
||||||
return new value_type[cnt];
|
return new value_type[cnt];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user