48#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
49#define GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
55#include "gtest/internal/gtest-port.h"
57GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
62void operator<<(const testing::internal::Secret&,
int);
96 typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
104 *ss_ << msg.GetString();
108 explicit Message(
const char* str) : ss_(new ::std::stringstream) {
113 template <
typename T>
114 inline Message& operator<<(
const T& val) {
147 template <
typename T>
148 inline Message& operator<<(T*
const& pointer) {
149 if (pointer ==
nullptr) {
163 Message& operator<<(BasicNarrowIoManip val) {
169 Message& operator<<(
bool b) {
return *
this << (b ?
"true" :
"false"); }
173 Message& operator<<(
const wchar_t* wide_c_str);
174 Message& operator<<(
wchar_t* wide_c_str);
176#if GTEST_HAS_STD_WSTRING
179 Message& operator<<(const ::std::wstring& wstr);
186 std::string GetString()
const;
190 const std::unique_ptr< ::std::stringstream> ss_;
194 void operator=(
const Message&);
198inline std::ostream& operator<<(std::ostream& os,
const Message& sb) {
199 return os << sb.GetString();
209std::string StreamableToString(
const T& streamable) {
210 return (Message() << streamable).GetString();
216GTEST_DISABLE_MSC_WARNINGS_POP_()
Definition gtest-message.h:92