Adding grpc::string_ref class.
- Strict subset of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html
- Useful to avoid unnecessary string copies.
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 627e6ac..6154ff0 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -1164,6 +1164,21 @@
],
"headers": [],
"language": "c++",
+ "name": "cxx_string_ref_test",
+ "src": [
+ "test/cpp/util/string_ref_test.cc"
+ ]
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc++",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c++",
"name": "cxx_time_test",
"src": [
"test/cpp/util/time_test.cc"
@@ -13125,6 +13140,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/string_ref.h",
"include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
@@ -13175,6 +13191,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/string_ref.h",
"include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
@@ -13213,6 +13230,7 @@
"src/cpp/util/byte_buffer.cc",
"src/cpp/util/slice.cc",
"src/cpp/util/status.cc",
+ "src/cpp/util/string_ref.cc",
"src/cpp/util/time.cc"
]
},
@@ -13299,6 +13317,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/string_ref.h",
"include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
@@ -13346,6 +13365,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/string_ref.h",
"include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
@@ -13376,6 +13396,7 @@
"src/cpp/util/byte_buffer.cc",
"src/cpp/util/slice.cc",
"src/cpp/util/status.cc",
+ "src/cpp/util/string_ref.cc",
"src/cpp/util/time.cc"
]
},