|
@@ -71,8 +71,6 @@ namespace std {}
|
|
namespace google {
|
|
namespace google {
|
|
namespace protobuf {
|
|
namespace protobuf {
|
|
|
|
|
|
-using namespace std; // Don't do this at home, kids.
|
|
|
|
-
|
|
|
|
#undef GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
|
|
#undef GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
|
|
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
|
|
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
|
|
TypeName(const TypeName&); \
|
|
TypeName(const TypeName&); \
|
|
@@ -126,7 +124,7 @@ void LIBPROTOBUF_EXPORT VerifyVersion(int headerVersion, int minLibraryVersion,
|
|
const char* filename);
|
|
const char* filename);
|
|
|
|
|
|
// Converts a numeric version number to a string.
|
|
// Converts a numeric version number to a string.
|
|
-string LIBPROTOBUF_EXPORT VersionString(int version);
|
|
|
|
|
|
+std::string LIBPROTOBUF_EXPORT VersionString(int version);
|
|
|
|
|
|
} // namespace internal
|
|
} // namespace internal
|
|
|
|
|
|
@@ -369,6 +367,7 @@ struct CompileAssert {
|
|
typedef ::google::protobuf::internal::CompileAssert<(bool(expr))> \
|
|
typedef ::google::protobuf::internal::CompileAssert<(bool(expr))> \
|
|
msg[bool(expr) ? 1 : -1]
|
|
msg[bool(expr) ? 1 : -1]
|
|
|
|
|
|
|
|
+
|
|
// Implementation details of COMPILE_ASSERT:
|
|
// Implementation details of COMPILE_ASSERT:
|
|
//
|
|
//
|
|
// - COMPILE_ASSERT works by defining an array type that has -1
|
|
// - COMPILE_ASSERT works by defining an array type that has -1
|
|
@@ -636,7 +635,7 @@ class LIBPROTOBUF_EXPORT LogMessage {
|
|
LogMessage(LogLevel level, const char* filename, int line);
|
|
LogMessage(LogLevel level, const char* filename, int line);
|
|
~LogMessage();
|
|
~LogMessage();
|
|
|
|
|
|
- LogMessage& operator<<(const string& value);
|
|
|
|
|
|
+ LogMessage& operator<<(const std::string& value);
|
|
LogMessage& operator<<(const char* value);
|
|
LogMessage& operator<<(const char* value);
|
|
LogMessage& operator<<(char value);
|
|
LogMessage& operator<<(char value);
|
|
LogMessage& operator<<(int value);
|
|
LogMessage& operator<<(int value);
|
|
@@ -652,7 +651,7 @@ class LIBPROTOBUF_EXPORT LogMessage {
|
|
LogLevel level_;
|
|
LogLevel level_;
|
|
const char* filename_;
|
|
const char* filename_;
|
|
int line_;
|
|
int line_;
|
|
- string message_;
|
|
|
|
|
|
+ std::string message_;
|
|
};
|
|
};
|
|
|
|
|
|
// Used to make the entire "LOG(BLAH) << etc." expression have a void return
|
|
// Used to make the entire "LOG(BLAH) << etc." expression have a void return
|
|
@@ -731,7 +730,7 @@ class LIBPROTOBUF_EXPORT LogFinisher {
|
|
#endif // !NDEBUG
|
|
#endif // !NDEBUG
|
|
|
|
|
|
typedef void LogHandler(LogLevel level, const char* filename, int line,
|
|
typedef void LogHandler(LogLevel level, const char* filename, int line,
|
|
- const string& message);
|
|
|
|
|
|
+ const std::string& message);
|
|
|
|
|
|
// The protobuf library sometimes writes warning and error messages to
|
|
// The protobuf library sometimes writes warning and error messages to
|
|
// stderr. These messages are primarily useful for developers, but may
|
|
// stderr. These messages are primarily useful for developers, but may
|
|
@@ -1173,6 +1172,10 @@ LIBPROTOBUF_EXPORT void OnShutdown(void (*func)());
|
|
|
|
|
|
} // namespace internal
|
|
} // namespace internal
|
|
|
|
|
|
|
|
+// This is at the end of the file instead of the beginning to work around a bug
|
|
|
|
+// in some versions of MSVC.
|
|
|
|
+using namespace std; // Don't do this at home, kids.
|
|
|
|
+
|
|
} // namespace protobuf
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
} // namespace google
|
|
|
|
|