mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 20:15:34 +00:00
Fixed generation of c++ code with flags (#6637)
* Fixed generation of c++ code with flags * tweaking const * moved to CONSTEXPR_CP11
This commit is contained in:
@@ -1620,7 +1620,7 @@ class CppGenerator : public BaseGenerator {
|
||||
if (!opts_.generate_name_strings) { return; }
|
||||
auto fullname = struct_def.defined_namespace->GetFullyQualifiedName(name);
|
||||
code_.SetValue("NAME", fullname);
|
||||
code_.SetValue("CONSTEXPR", "FLATBUFFERS_CONSTEXPR");
|
||||
code_.SetValue("CONSTEXPR", "FLATBUFFERS_CONSTEXPR_CPP11");
|
||||
code_ += " static {{CONSTEXPR}} const char *GetFullyQualifiedName() {";
|
||||
code_ += " return \"{{NAME}}\";";
|
||||
code_ += " }";
|
||||
|
||||
Reference in New Issue
Block a user