mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
update C++ generator to emit scoped enums in vector of unions (#7075)
This commit is contained in:
@@ -671,8 +671,9 @@ class CppGenerator : public BaseGenerator {
|
||||
}
|
||||
|
||||
bool VectorElementUserFacing(const Type &type) const {
|
||||
return opts_.g_cpp_std >= cpp::CPP_STD_17 && opts_.g_only_fixed_enums &&
|
||||
IsEnum(type);
|
||||
return (opts_.scoped_enums && IsEnum(type)) ||
|
||||
(opts_.g_cpp_std >= cpp::CPP_STD_17 && opts_.g_only_fixed_enums &&
|
||||
IsEnum(type));
|
||||
}
|
||||
|
||||
void GenComment(const std::vector<std::string> &dc, const char *prefix = "") {
|
||||
|
||||
Reference in New Issue
Block a user