Go to the documentation of this file.
17 #ifndef ABSL_STRINGS_INTERNAL_RESIZE_UNINITIALIZED_H_
18 #define ABSL_STRINGS_INTERNAL_RESIZE_UNINITIALIZED_H_
22 #include <type_traits>
25 #include "absl/base/port.h"
26 #include "absl/meta/type_traits.h"
30 namespace strings_internal {
35 template <
typename string_type,
typename =
void>
42 template <
typename string_type>
44 string_type,
absl::
void_t<decltype(std::declval<string_type&>()
45 .__resize_default_init(237))> > {
57 template <
typename string_type>
66 template <
typename string_type,
typename =
void>
74 template <
typename string_type>
76 const size_t cap =
s->capacity();
85 template <
typename string_type,
typename =
void>
87 static void Append(string_type* s,
size_t n) {
92 template <
typename string_type>
94 string_type,
absl::
void_t<decltype(std::declval<string_type&>()
95 .__append_default_init(237))> > {
96 static void Append(string_type* s,
size_t n) {
97 s->__append_default_init(
n);
105 template <
typename string_type>
107 const size_t size =
s->size();
119 #endif // ABSL_STRINGS_INTERNAL_RESIZE_UNINITIALIZED_H_
static void Append(string_type *s, size_t n)
integral_constant< bool, true > true_type
integral_constant< bool, false > false_type
void STLStringResizeUninitializedAmortized(string_type *s, size_t new_size)
void STLStringReserveAmortized(string_type *s, size_t new_size)
#define ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_BEGIN
static void Resize(string_type *s, size_t new_size)
static void Append(string_type *s, size_t n)
std::false_type HasMember
static void Resize(string_type *s, size_t new_size)
typename type_traits_internal::VoidTImpl< Ts... >::type void_t
void STLStringResizeUninitialized(string_type *s, size_t new_size)
constexpr bool STLStringSupportsNontrashingResize(string_type *)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:04