mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
Add the deleted string_view(std::nullptr_t) constructor from C++23
This will reject string_view(nullptr) at compile-time. PiperOrigin-RevId: 835352115 Change-Id: Ic68e55d3eba02e002ed5f1791c40efbb0f0daaf0
This commit is contained in:
committed by
Copybara-Service
parent
8036cae8ac
commit
69e7e0a383
@@ -246,6 +246,9 @@ class ABSL_ATTRIBUTE_VIEW string_view {
|
||||
}
|
||||
#endif // ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L
|
||||
|
||||
// Deleted constructor from std::nullptr_t from C++23.
|
||||
string_view(std::nullptr_t) = delete;
|
||||
|
||||
constexpr string_view(const string_view&) noexcept = default;
|
||||
string_view& operator=(const string_view&) noexcept = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user