How did you determine the typenames?
by word count before comma "type A" == 2 "const type A" == 2 "enum type A" == 2 "struct type A" == 2 "type A = 0" == 2
And don't forget in a C++ declaration the names A and B may or may not be present.
i'm not a C++ guru, could you share some example?