diff options
author | nechda <[email protected]> | 2024-08-29 23:50:27 +0300 |
---|---|---|
committer | nechda <[email protected]> | 2024-08-30 00:05:25 +0300 |
commit | e10d6638f07a82edae3ea8197b9f5c0affcc07ea (patch) | |
tree | 571c38cec05813766a1ad290c9d51ce7ace52919 /contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h | |
parent | e79b38f2bbbf78d295d1901d2a79f898022d5224 (diff) |
Update cpp-protobuf to 22.5
Привет!\
Этот PR переключат cpp & python библиотеки protobuf на версию 22.5
Если у вас возникли проблемы после влития этого PR:
1. Если начали падать канон тесты, то проведите их переканонизацию
2. Прочитайте <https://wiki.yandex-team.ru/users/nechda/obnovlenie-cpp-protobuf-22.5/> страничку с основными изменениями
3. Если страничка в вики не помогла, то пишите в [DEVTOOLSSUPPORT](https://st.yandex-team.ru/DEVTOOLSSUPPORT)
7fecade616c20a841b9e9af7b7998bdfc8d2807d
Diffstat (limited to 'contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h')
-rw-r--r-- | contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h index aa63845d300..5f95dd1d2f5 100644 --- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h +++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/generator.h @@ -38,24 +38,27 @@ #define GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ #include <string> -#include <google/protobuf/compiler/code_generator.h> +#include <utility> + +#include "google/protobuf/compiler/code_generator.h" // Must be included last. -#include <google/protobuf/port_def.inc> +#include "google/protobuf/port_def.inc" namespace google { namespace protobuf { namespace compiler { namespace cpp { - // CodeGenerator implementation which generates a C++ source file and // header. If you create your own protocol compiler binary and you want // it to support C++ output, you can do so by registering an instance of this // CodeGenerator with the CommandLineInterface in your main() function. class PROTOC_EXPORT CppGenerator : public CodeGenerator { public: - CppGenerator(); - ~CppGenerator() override; + CppGenerator() = default; + CppGenerator(const CppGenerator&) = delete; + CppGenerator& operator=(const CppGenerator&) = delete; + ~CppGenerator() override = default; enum class Runtime { kGoogle3, // Use the internal google3 runtime. @@ -74,34 +77,29 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { // If set to a non-empty string, generated code will do: // #include "<BASE>/google/protobuf/message.h" // instead of: - // #include <google/protobuf/message.h> + // #include "google/protobuf/message.h" // This has no effect if opensource_runtime = false. - void set_runtime_include_base(const TProtoStringType& base) { - runtime_include_base_ = base; + void set_runtime_include_base(TProtoStringType base) { + runtime_include_base_ = std::move(base); } - // implements CodeGenerator ---------------------------------------- bool Generate(const FileDescriptor* file, const TProtoStringType& parameter, GeneratorContext* generator_context, TProtoStringType* error) const override; uint64_t GetSupportedFeatures() const override { - // We don't fully support this yet, but this is needed to unblock the tests, - // and we will have full support before the experimental flag is removed. return FEATURE_PROTO3_OPTIONAL; } private: - bool opensource_runtime_ = true; + bool opensource_runtime_ = PROTO2_IS_OSS; TProtoStringType runtime_include_base_; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CppGenerator); }; - } // namespace cpp } // namespace compiler } // namespace protobuf } // namespace google -#include <google/protobuf/port_undef.inc> +#include "google/protobuf/port_undef.inc" #endif // GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ |