From ae181cc93d06ae1129d6d8ba3c2d742153605d3a Mon Sep 17 00:00:00 2001 From: Anders Dalvander Date: Fri, 9 Feb 2024 16:39:43 +0100 Subject: [PATCH] C++23 compatibility: basic_string_view cannot be constructed from nullptr (#3846) Co-authored-by: Anders Dalvander --- include/fmt/base.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/fmt/base.h b/include/fmt/base.h index f21aeb78942a..56d5c9090d94 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -487,6 +487,8 @@ template class basic_string_view { constexpr basic_string_view(const Char* s, size_t count) noexcept : data_(s), size_(count) {} + constexpr basic_string_view(std::nullptr_t) = delete; + /** Constructs a string reference object from a C string. */