We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5625910 commit a0eef7dCopy full SHA for a0eef7d
1 file changed
cpp2rust/converter/mapper.cpp
@@ -42,7 +42,12 @@ clang::PrintingPolicy getPrintPolicy() {
42
}
43
44
std::string GetMapKey(const std::string &str) {
45
- return str.substr(0, str.find_first_of("<["));
+ auto n = str.find_first_of("<[");
46
+ if (n == std::string::npos || str[n] == '<') {
47
+ return str.substr(0, n);
48
+ }
49
+ // something like int[][] or T1[] -> []
50
+ return str.substr(n+1);
51
52
53
void AddTypeRule(std::string src, TranslationRule::TypeRule &&rule) {
0 commit comments