From d9ab86cdbf87915319020241de65b821be068db7 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Tue, 25 Aug 2015 22:20:47 -0700 Subject: Fix compile issues with -std=c++11 This compiles with -std=c++11: message Foo { map value = 1; } This does not compile: message Foo { map value = 1; } Needs to dig more into the underlying issue. --- src/google/protobuf/map_test.cc | 2 +- src/google/protobuf/map_unittest.proto | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/google') diff --git a/src/google/protobuf/map_test.cc b/src/google/protobuf/map_test.cc index a74801d9..16a24c25 100644 --- a/src/google/protobuf/map_test.cc +++ b/src/google/protobuf/map_test.cc @@ -2188,7 +2188,7 @@ TEST_F(MapFieldInDynamicMessageTest, MapSpaceUsed) { TEST_F(MapFieldInDynamicMessageTest, RecursiveMap) { TestRecursiveMapMessage from; - (*from.mutable_a())[0]; + (*from.mutable_a())[""]; string data = from.SerializeAsString(); google::protobuf::scoped_ptr to( factory_.GetPrototype(recursive_map_descriptor_)->New()); diff --git a/src/google/protobuf/map_unittest.proto b/src/google/protobuf/map_unittest.proto index d3b525a0..aea1e8ce 100644 --- a/src/google/protobuf/map_unittest.proto +++ b/src/google/protobuf/map_unittest.proto @@ -116,7 +116,7 @@ message MessageContainingEnumCalledType { enum Type { TYPE_FOO = 0; } - map type = 1; + map type = 1; } // Previously, message cannot contain map field called "entry". @@ -125,5 +125,5 @@ message MessageContainingMapCalledEntry { } message TestRecursiveMapMessage { - map a = 1; + map a = 1; } -- cgit v1.2.3