diff options
author | Abseil Team <absl-team@google.com> | 2018-01-03T17·52-0800 |
---|---|---|
committer | Jon Cohen <cohenjon@google.com> | 2018-01-03T22·34-0500 |
commit | 0271cd35577599fa99b59202da17d3136956e4c0 (patch) | |
tree | f8edb7f43c66b34be85368a89414882870ebee0b /absl/strings/internal/str_split_internal.h | |
parent | 6365d1744b405cec48317e9597a80533acab0798 (diff) |
Changes imported from Abseil "staging" branch:
- 6e88015f26885b66ce9b11696eb9c8d96ef7c0f6 Add ABSL_MUST_USE_RESULT to absl::StripPrefix and absl::S... by Mark Barolak <mbar@google.com> - 47d8de97748da346ad2a962f27389e0380a7a716 Fix missing header include when compiling with _GLIBCXX_D... by Alex Strelnikov <strel@google.com> GitOrigin-RevId: 6e88015f26885b66ce9b11696eb9c8d96ef7c0f6 Change-Id: I8698c77d9eab81455b209a6bef4bb2d5b32ebd65
Diffstat (limited to 'absl/strings/internal/str_split_internal.h')
-rw-r--r-- | absl/strings/internal/str_split_internal.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/absl/strings/internal/str_split_internal.h b/absl/strings/internal/str_split_internal.h index dc31a8ef9090..a1b10f3addcf 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 <glibcxx_debug_traits.h> -#endif // _GLIBCXX_DEBUG - #include <array> #include <initializer_list> #include <iterator> @@ -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 <typename T> 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 <typename C> struct SplitterIsConvertibleTo : std::enable_if< - !IsStrictlyDebugWrapperBase<C>::value && - !IsInitializerList<C>::value && - HasValueType<C>::value && - HasConstIterator<C>::value> {}; +#ifdef _GLIBCXX_DEBUG + !IsStrictlyBaseOfAndConvertibleToSTLContainer<C>::value && +#endif // _GLIBCXX_DEBUG + !IsInitializerList<C>::value && HasValueType<C>::value && + HasConstIterator<C>::value> { +}; // This class implements the range that is returned by absl::StrSplit(). This // class has templated conversion operators that allow it to be implicitly |