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
This commit is contained in:
parent
6365d1744b
commit
0271cd3557
6 changed files with 241 additions and 18 deletions
|
@ -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"
|
||||
|
||||
#ifdef _GLIBCXX_DEBUG
|
||||
#include "absl/strings/internal/stl_type_traits.h"
|
||||
#endif // _GLIBCXX_DEBUG
|
||||
|
||||
namespace absl {
|
||||
namespace strings_internal {
|
||||
|
||||
#ifdef _GLIBCXX_DEBUG
|
||||
using ::glibcxx_debug_traits::IsStrictlyDebugWrapperBase;
|
||||
#else // _GLIBCXX_DEBUG
|
||||
template <typename T> struct IsStrictlyDebugWrapperBase : std::false_type {};
|
||||
#endif // _GLIBCXX_DEBUG
|
||||
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue