47#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
48#define GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
54#include "gtest/internal/gtest-port.h"
56GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
61void operator<<(const testing::internal::Secret&,
int);
95 typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
103 *ss_ << msg.GetString();
107 explicit Message(
const char* str) : ss_(new ::std::stringstream) {
112 template <
typename T>
113 inline Message& operator <<(
const T& val) {
146 template <
typename T>
147 inline Message& operator <<(T*
const& pointer) {
148 if (pointer ==
nullptr) {
162 Message& operator <<(BasicNarrowIoManip val) {
169 return *
this << (b ?
"true" :
"false");
174 Message& operator <<(
const wchar_t* wide_c_str);
175 Message& operator <<(
wchar_t* wide_c_str);
177#if GTEST_HAS_STD_WSTRING
180 Message& operator <<(const ::std::wstring& wstr);
187 std::string GetString()
const;
191 const std::unique_ptr< ::std::stringstream> ss_;
195 void operator=(
const Message&);
199inline std::ostream& operator <<(std::ostream& os,
const Message& sb) {
200 return os << sb.GetString();
210std::string StreamableToString(
const T& streamable) {
211 return (Message() << streamable).GetString();
217GTEST_DISABLE_MSC_WARNINGS_POP_()
Definition gtest-message.h:91