From d7a6e7464bb4e31db396074a1a4161acc933758b Mon Sep 17 00:00:00 2001 From: Charles Milette Date: Sun, 15 Dec 2019 17:40:45 -0500 Subject: [PATCH] Only enable feature when alias CTAD is available --- include/fmt/format.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/fmt/format.h b/include/fmt/format.h index 465a2871..b76c1391 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -700,6 +700,7 @@ void basic_memory_buffer::grow(std::size_t size) { if (old_data != store_) Allocator::deallocate(old_data, old_capacity); } +#if defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201907L template > using memory_buffer = basic_memory_buffer; @@ -707,6 +708,10 @@ using memory_buffer = basic_memory_buffer; template > using wmemory_buffer = basic_memory_buffer; +#else +using memory_buffer = basic_memory_buffer; +using wmemory_buffer = basic_memory_buffer; +#endif // defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201907L /** A formatting error such as invalid format string. */ FMT_CLASS_API