From 5c20ca1fccbf0b4d19f5823517fde2869101f921 Mon Sep 17 00:00:00 2001 From: "liujisi@google.com" Date: Tue, 21 Dec 2010 05:33:13 +0000 Subject: Escape C++ Trigraphs. --- src/google/protobuf/unittest.proto | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/google/protobuf/unittest.proto') diff --git a/src/google/protobuf/unittest.proto b/src/google/protobuf/unittest.proto index de4425be..97ec6747 100644 --- a/src/google/protobuf/unittest.proto +++ b/src/google/protobuf/unittest.proto @@ -493,6 +493,13 @@ message TestExtremeDefaultValues { optional float inf_float = 17 [default = inf]; optional float neg_inf_float = 18 [default = -inf]; optional float nan_float = 19 [default = nan]; + + // Tests for C++ trigraphs. + // Trigraphs should be escaped in C++ generated files, but they should not be + // escaped for other languages. + // Note that in .proto file, "\?" is a valid way to escape ? in string + // literals. + optional string cpp_trigraph = 20 [default = "? \? ?? \?? \??? ??/ ?\?-"]; } message SparseEnumMessage { -- cgit v1.2.3