aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2017-08-11 15:36:12 -0700
committerGitHub <noreply@github.com>2017-08-11 15:36:12 -0700
commit1bd2d1fc756dc36b38a35c7f5dad028052892d2c (patch)
tree1ffca98d574efc36245d05dd681ec3e4e3980058
parentd2f3adb3b30c8d032f7bda0137593e932975306c (diff)
parent31b3bd9811ad0035367bbdde12a42c6e9403f153 (diff)
downloadprotobuf-1bd2d1fc756dc36b38a35c7f5dad028052892d2c.tar.gz
protobuf-1bd2d1fc756dc36b38a35c7f5dad028052892d2c.tar.bz2
protobuf-1bd2d1fc756dc36b38a35c7f5dad028052892d2c.zip
Merge pull request #3484 from pherl/qualifier
Make compilers without ref-qualifier support happy.
-rw-r--r--src/google/protobuf/text_format.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc
index 1ebbdf86..f1d2e8bc 100644
--- a/src/google/protobuf/text_format.cc
+++ b/src/google/protobuf/text_format.cc
@@ -1414,7 +1414,9 @@ class StringBaseTextGenerator : public TextFormat::BaseTextGenerator {
public:
void Print(const char* text, size_t size) { output_.append(text, size); }
-#if LANG_CXX11
+// Some compilers do not support ref-qualifiers even in C++11 mode.
+// Disable the optimization for now and revisit it later.
+#if 0 // LANG_CXX11
string Consume() && { return std::move(output_); }
#else // !LANG_CXX11
const string& Get() { return output_; }
@@ -1432,7 +1434,7 @@ class StringBaseTextGenerator : public TextFormat::BaseTextGenerator {
TextFormat::FieldValuePrinter::FieldValuePrinter() {}
TextFormat::FieldValuePrinter::~FieldValuePrinter() {}
-#if LANG_CXX11
+#if 0 // LANG_CXX11
#define FORWARD_IMPL(fn, ...) \
StringBaseTextGenerator generator; \
delegate_.fn(__VA_ARGS__, &generator); \