mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
Temporarily revert dangling std::string_view detection until dependent is fixed
PiperOrigin-RevId: 621413395 Change-Id: I20e9fac94e81e59c0d723f115670c8cf68e9b44a
This commit is contained in:
committed by
Copybara-Service
parent
643c7bab49
commit
d5e4260976
@@ -630,11 +630,6 @@ template <typename T>
|
||||
struct IsView : std::integral_constant<bool, std::is_pointer<T>::value ||
|
||||
IsViewImpl<T>::value> {};
|
||||
|
||||
#ifdef ABSL_HAVE_STD_STRING_VIEW
|
||||
template <typename Char, typename Traits>
|
||||
struct IsView<std::basic_string_view<Char, Traits>> : std::true_type {};
|
||||
#endif
|
||||
|
||||
#ifdef __cpp_lib_span
|
||||
template <typename T>
|
||||
struct IsView<std::span<T>> : std::true_type {};
|
||||
|
||||
@@ -45,12 +45,6 @@ static_assert(IsOwnerAndNotView<std::string>::value,
|
||||
"string is an owner, not a view");
|
||||
static_assert(IsOwnerAndNotView<std::wstring>::value,
|
||||
"wstring is an owner, not a view");
|
||||
#ifdef ABSL_HAVE_STD_STRING_VIEW
|
||||
static_assert(!IsOwnerAndNotView<std::string_view>::value,
|
||||
"string_view is a view, not an owner");
|
||||
static_assert(!IsOwnerAndNotView<std::wstring_view>::value,
|
||||
"wstring_view is a view, not an owner");
|
||||
#endif
|
||||
|
||||
template <class T, class U>
|
||||
struct simple_pair {
|
||||
|
||||
@@ -173,7 +173,6 @@ class string_view {
|
||||
using reverse_iterator = const_reverse_iterator;
|
||||
using size_type = size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using absl_internal_is_view = std::true_type;
|
||||
|
||||
static constexpr size_type npos = static_cast<size_type>(-1);
|
||||
|
||||
|
||||
@@ -47,14 +47,6 @@
|
||||
|
||||
namespace {
|
||||
|
||||
static_assert(!absl::type_traits_internal::IsOwner<absl::string_view>::value &&
|
||||
absl::type_traits_internal::IsView<absl::string_view>::value,
|
||||
"string_view is a view, not an owner");
|
||||
|
||||
static_assert(absl::type_traits_internal::IsLifetimeBoundAssignment<
|
||||
absl::string_view, std::string>::value,
|
||||
"lifetimebound assignment not detected");
|
||||
|
||||
// A minimal allocator that uses malloc().
|
||||
template <typename T>
|
||||
struct Mallocator {
|
||||
|
||||
Reference in New Issue
Block a user