Skip to content

Commit

Permalink
C++23 compatibility: basic_string_view cannot be constructed from nul…
Browse files Browse the repository at this point in the history
…lptr (fmtlib#3846)

Co-authored-by: Anders Dalvander <[email protected]>
  • Loading branch information
2 people authored and happymonkey1 committed Apr 6, 2024
1 parent dcebf64 commit 20e0dc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ template <typename Char> 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.
*/
Expand Down

0 comments on commit 20e0dc1

Please sign in to comment.