Lines Matching defs:std

68 //   std::string ::testing::PrintToString(const T& value);
84 // std::vector<string> UniversalTersePrintTupleFieldsToStrings(
136 void UniversalPrint(const T& value, ::std::ostream* os);
145 struct IsStdSpan<std::span<E>> {
153 // NOTE: Since std::span does not have const_iterator until C++23, it would
156 // because of iterator::iterator. Which means std::span satisfies the *intended*
160 typename = typename std::enable_if<
164 static void PrintValue(const T& container, std::ostream* os) {
197 template <typename T, typename = typename std::enable_if<
198 std::is_function<T>::value>::type>
199 static void PrintValue(T* p, ::std::ostream* os) {
213 static void PrintValue(T* p, ::std::ostream* os) {
238 typename = typename std::enable_if<
239 !std::is_member_pointer<T>::value>::type>
244 static auto PrintValue(const T& value, ::std::ostream* os)
261 typename = typename std::enable_if<
263 static void PrintValue(const T& value, ::std::ostream* os) {
264 std::string pretty_str = value.ShortDebugString();
280 static void PrintValue(internal::BiggestInt value, ::std::ostream* os) {
287 static void PrintValue(internal::StringView value, ::std::ostream* os) {
296 typename = typename std::enable_if<
298 static void PrintValue(const T& value, ::std::ostream* os) {
307 size_t count, ::std::ostream* os);
311 static void PrintValue(const T& value, ::std::ostream* os) {
315 reinterpret_cast<const void*>(std::addressof(value))),
322 static void PrintValue(const T&, ::std::ostream* os) {
333 T, decltype(Printer::PrintValue(std::declval<const T&>(), nullptr)),
348 void PrintWithFallback(const T& value, ::std::ostream* os) {
379 static ::std::string Format(const ToPrint& value) {
388 static ::std::string Format(const ToPrint* value) {
400 static ::std::string Format(CharType* value) { \
427 static ::std::string Format(CharType* value) { \
432 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string);
433 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string);
435 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char8_t, ::std::u8string);
436 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char8_t, ::std::u8string);
438 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char16_t, ::std::u16string);
439 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char16_t, ::std::u16string);
440 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char32_t, ::std::u32string);
441 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char32_t, ::std::u32string);
444 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring);
445 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring);
455 // against an std::string object, for example.
459 std::string FormatForComparisonFailureMessage(const T1& value,
486 void PrintTo(const T& value, ::std::ostream* os) {
495 GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
496 GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
497 inline void PrintTo(char c, ::std::ostream* os) {
505 inline void PrintTo(bool x, ::std::ostream* os) {
516 GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
518 GTEST_API_ void PrintTo(char32_t c, ::std::ostream* os);
519 inline void PrintTo(char16_t c, ::std::ostream* os) {
523 inline void PrintTo(char8_t c, ::std::ostream* os) {
530 GTEST_API_ void PrintTo(__uint128_t v, ::std::ostream* os);
531 GTEST_API_ void PrintTo(__int128_t v, ::std::ostream* os);
552 int full = std::numeric_limits<FloatType>::max_digits10;
601 inline void PrintTo(float f, ::std::ostream* os) {
608 inline void PrintTo(double d, ::std::ostream* os) {
616 GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
617 inline void PrintTo(char* s, ::std::ostream* os) {
623 inline void PrintTo(const signed char* s, ::std::ostream* os) {
626 inline void PrintTo(signed char* s, ::std::ostream* os) {
629 inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
632 inline void PrintTo(unsigned char* s, ::std::ostream* os) {
637 GTEST_API_ void PrintTo(const char8_t* s, ::std::ostream* os);
638 inline void PrintTo(char8_t* s, ::std::ostream* os) {
643 GTEST_API_ void PrintTo(const char16_t* s, ::std::ostream* os);
644 inline void PrintTo(char16_t* s, ::std::ostream* os) {
648 GTEST_API_ void PrintTo(const char32_t* s, ::std::ostream* os);
649 inline void PrintTo(char32_t* s, ::std::ostream* os) {
660 GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
661 inline void PrintTo(wchar_t* s, ::std::ostream* os) {
672 void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
680 // Overloads for ::std::string.
681 GTEST_API_ void PrintStringTo(const ::std::string& s, ::std::ostream* os);
682 inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
686 // Overloads for ::std::u8string
688 GTEST_API_ void PrintU8StringTo(const ::std::u8string& s, ::std::ostream* os);
689 inline void PrintTo(const ::std::u8string& s, ::std::ostream* os) {
694 // Overloads for ::std::u16string
695 GTEST_API_ void PrintU16StringTo(const ::std::u16string& s, ::std::ostream* os);
696 inline void PrintTo(const ::std::u16string& s, ::std::ostream* os) {
700 // Overloads for ::std::u32string
701 GTEST_API_ void PrintU32StringTo(const ::std::u32string& s, ::std::ostream* os);
702 inline void PrintTo(const ::std::u32string& s, ::std::ostream* os) {
706 // Overloads for ::std::wstring.
708 GTEST_API_ void PrintWideStringTo(const ::std::wstring& s, ::std::ostream* os);
709 inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
716 inline void PrintTo(internal::StringView sp, ::std::ostream* os) {
717 PrintTo(::std::string(sp), os);
721 inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
724 inline void PrintTo(const std::type_info& info, std::ostream* os) {
730 void PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {
740 void PrintSmartPointer(const Ptr& ptr, std::ostream* os, char) {
749 typename = typename std::enable_if<!std::is_void<T>::value &&
750 !std::is_array<T>::value>::type>
751 void PrintSmartPointer(const Ptr& ptr, std::ostream* os, int) {
762 void PrintTo(const std::unique_ptr<T, D>& ptr, std::ostream* os) {
767 void PrintTo(const std::shared_ptr<T>& ptr, std::ostream* os) {
774 void PrintTupleTo(const T&, std::integral_constant<size_t, 0>,
775 ::std::ostream*) {}
778 void PrintTupleTo(const T& t, std::integral_constant<size_t, I>,
779 ::std::ostream* os) {
780 PrintTupleTo(t, std::integral_constant<size_t, I - 1>(), os);
786 UniversalPrinter<typename std::tuple_element<I - 1, T>::type>::Print(
787 std::get<I - 1>(t), os);
791 void PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) {
793 PrintTupleTo(t, std::integral_constant<size_t, sizeof...(Types)>(), os);
797 // Overload for std::pair.
799 void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
821 static void Print(const T& value, ::std::ostream* os) {
842 // Printer for std::any / absl::any
847 static void Print(const Any& value, ::std::ostream* os) {
856 static std::string GetTypeName(const Any& value) {
870 // Printer for std::optional / absl::optional
875 static void Print(const Optional<T>& value, ::std::ostream* os) {
889 static void Print(decltype(Nullopt()), ::std::ostream* os) {
898 // Printer for std::variant / absl::variant
903 static void Print(const Variant<T...>& value, ::std::ostream* os) {
908 std::visit(Visitor{os, value.index()}, value);
921 ::std::ostream* os;
922 std::size_t index;
931 void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
953 ::std::ostream* os);
958 ::std::ostream* os);
963 ::std::ostream* os);
967 ::std::ostream* os);
971 ::std::ostream* os);
979 static void Print(const T (&a)[N], ::std::ostream* os) {
992 static void Print(const T& value, ::std::ostream* os) {
1011 static void Print(const T& value, ::std::ostream* os) {
1018 static void Print(const T& value, ::std::ostream* os) {
1023 class UniversalTersePrinter<std::reference_wrapper<T>> {
1025 static void Print(std::reference_wrapper<T> value, ::std::ostream* os) {
1032 static void Print(const T (&value)[N], ::std::ostream* os) {
1039 static void Print(const char* str, ::std::ostream* os) {
1043 UniversalPrint(std::string(str), os);
1055 static void Print(const char8_t* str, ::std::ostream* os) {
1059 UniversalPrint(::std::u8string(str), os);
1071 static void Print(const char16_t* str, ::std::ostream* os) {
1075 UniversalPrint(::std::u16string(str), os);
1086 static void Print(const char32_t* str, ::std::ostream* os) {
1090 UniversalPrint(::std::u32string(str), os);
1102 static void Print(const wchar_t* str, ::std::ostream* os) {
1106 UniversalPrint(::std::wstring(str), os);
1115 static void Print(wchar_t* str, ::std::ostream* os) {
1121 void UniversalTersePrint(const T& value, ::std::ostream* os) {
1130 void UniversalPrint(const T& value, ::std::ostream* os) {
1137 typedef ::std::vector<::std::string> Strings;
1142 void TersePrintPrefixToStrings(const Tuple&, std::integral_constant<size_t, 0>,
1146 std::integral_constant<size_t, I>,
1148 TersePrintPrefixToStrings(t, std::integral_constant<size_t, I - 1>(),
1150 ::std::stringstream ss;
1151 UniversalTersePrint(std::get<I - 1>(t), &ss);
1162 value, std::integral_constant<size_t, std::tuple_size<Tuple>::value>(),
1170 ::std::string PrintToString(const T& value) {
1171 ::std::stringstream ss;