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 (#3846)

Co-authored-by: Anders Dalvander <anders.dalvander@sartorius.com>
  • Loading branch information
dalle and Anders Dalvander authored Feb 9, 2024
1 parent 3a6fb2f commit ae181cc
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 ae181cc

Please sign in to comment.