From 0271cd35577599fa99b59202da17d3136956e4c0 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 3 Jan 2018 09:52:58 -0800 Subject: Changes imported from Abseil "staging" branch: - 6e88015f26885b66ce9b11696eb9c8d96ef7c0f6 Add ABSL_MUST_USE_RESULT to absl::StripPrefix and absl::S... by Mark Barolak - 47d8de97748da346ad2a962f27389e0380a7a716 Fix missing header include when compiling with _GLIBCXX_D... by Alex Strelnikov GitOrigin-RevId: 6e88015f26885b66ce9b11696eb9c8d96ef7c0f6 Change-Id: I8698c77d9eab81455b209a6bef4bb2d5b32ebd65 --- absl/strings/internal/str_split_internal.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'absl/strings/internal/str_split_internal.h') diff --git a/absl/strings/internal/str_split_internal.h b/absl/strings/internal/str_split_internal.h index dc31a8ef..a1b10f3a 100644 --- a/absl/strings/internal/str_split_internal.h +++ b/absl/strings/internal/str_split_internal.h @@ -29,10 +29,6 @@ #ifndef ABSL_STRINGS_INTERNAL_STR_SPLIT_INTERNAL_H_ #define ABSL_STRINGS_INTERNAL_STR_SPLIT_INTERNAL_H_ -#ifdef _GLIBCXX_DEBUG -#include -#endif // _GLIBCXX_DEBUG - #include #include #include @@ -46,15 +42,13 @@ #include "absl/meta/type_traits.h" #include "absl/strings/string_view.h" -namespace absl { -namespace strings_internal { - #ifdef _GLIBCXX_DEBUG -using ::glibcxx_debug_traits::IsStrictlyDebugWrapperBase; -#else // _GLIBCXX_DEBUG -template struct IsStrictlyDebugWrapperBase : std::false_type {}; +#include "absl/strings/internal/stl_type_traits.h" #endif // _GLIBCXX_DEBUG +namespace absl { +namespace strings_internal { + // This class is implicitly constructible from everything that absl::string_view // is implicitly constructible from. If it's constructed from a temporary // std::string, the data is moved into a data member so its lifetime matches that of @@ -237,10 +231,12 @@ struct IsInitializerList template struct SplitterIsConvertibleTo : std::enable_if< - !IsStrictlyDebugWrapperBase::value && - !IsInitializerList::value && - HasValueType::value && - HasConstIterator::value> {}; +#ifdef _GLIBCXX_DEBUG + !IsStrictlyBaseOfAndConvertibleToSTLContainer::value && +#endif // _GLIBCXX_DEBUG + !IsInitializerList::value && HasValueType::value && + HasConstIterator::value> { +}; // This class implements the range that is returned by absl::StrSplit(). This // class has templated conversion operators that allow it to be implicitly -- cgit v1.2.3