From 8e42f448070c274187e08674acb519b8dc0edf7d Mon Sep 17 00:00:00 2001 From: Vitaly Bondar Date: Fri, 18 May 2018 22:21:08 +0300 Subject: [PATCH] Fix of namespace problem described in #4747 (#4752) --- src/idl_gen_cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idl_gen_cpp.cpp b/src/idl_gen_cpp.cpp index 36a624940..c71c15053 100644 --- a/src/idl_gen_cpp.cpp +++ b/src/idl_gen_cpp.cpp @@ -2047,7 +2047,7 @@ class CppGenerator : public BaseGenerator { auto cpp_type = field.attributes.Lookup("cpp_type"); std::string indexing; if (field.value.type.enum_def) { - indexing += "(" + field.value.type.enum_def->name + ")"; + indexing += "(" + WrapInNameSpace(*field.value.type.enum_def) + ")"; } indexing += "_e->Get(_i)"; if (field.value.type.element == BASE_TYPE_BOOL) { indexing += " != 0"; }