From af38cbf2ebf9c009fcea81cc316be64176da620e Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Wed, 8 Feb 2017 09:41:55 -0500 Subject: Make Slice enums scoped Add new cpp:scoped and objc:scoped metadata directives --- cpp/src/Slice/CPlusPlusUtil.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp') diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 9cf3dbb42d5..8b3219bf0fd 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -1679,7 +1679,7 @@ Slice::findMetaData(const StringList& metaData, int typeCtx) // // The priority of the metadata is as follows: // 1: array, range (C++98 only), view-type for "view" parameters - // 2: class (C++98 only), unscoped (C++11 only) + // 2: class (C++98 only), scoped (C++98 only), unscoped (C++11 only) // if(pos != string::npos) @@ -1716,7 +1716,7 @@ Slice::findMetaData(const StringList& metaData, int typeCtx) } } // - // Otherwise if the data is "class", "unscoped" it is returned. + // Otherwise if the data is "class", "scoped" or "unscoped" it is returned. // else { @@ -1725,6 +1725,10 @@ Slice::findMetaData(const StringList& metaData, int typeCtx) { return "%class"; } + else if(ss == "scoped" && !(typeCtx & TypeContextCpp11)) + { + return "%scoped"; + } else if(ss == "unscoped" && (typeCtx & TypeContextCpp11)) { return "%unscoped"; -- cgit v1.2.3