diff options
author | Chris Kennelly <ckennelly@google.com> | 2016-12-15 16:17:17 -0800 |
---|---|---|
committer | Chris Kennelly <ckennelly@google.com> | 2016-12-16 13:50:14 -0800 |
commit | 183d31cbdb5197b1a014893a91198e970379f656 (patch) | |
tree | 1dcb6e66e200a91724895185b4561aec8dc9552b /src/google/protobuf/source_context.pb.h | |
parent | a95e38ce8dec20d327692f4f5c2b0d37d6776696 (diff) |
Add rvalue setters for non-arena strings on C++11.
Diffstat (limited to 'src/google/protobuf/source_context.pb.h')
-rw-r--r-- | src/google/protobuf/source_context.pb.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 22150b5e..ed38ba2c 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -116,6 +116,9 @@ class LIBPROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message /* @ static const int kFileNameFieldNumber = 1; const ::std::string& file_name() const; void set_file_name(const ::std::string& value); + #if LANG_CXX11 + void set_file_name(::std::string&& value); + #endif void set_file_name(const char* value); void set_file_name(const char* value, size_t size); ::std::string* mutable_file_name(); @@ -155,6 +158,14 @@ inline void SourceContext::set_file_name(const ::std::string& value) { file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) } +#if LANG_CXX11 +inline void SourceContext::set_file_name(::std::string&& value) { + + file_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceContext.file_name) +} +#endif inline void SourceContext::set_file_name(const char* value) { file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |