Fix FullParentName for types not in a root namespace
This was an issue I ran into while making a code generator. I didn't end up depending on this codepath, but thought it might still be useful to you or other users of the library. Unfortunately, I cannot remember how to repro the issue I was seeing.
This was an issue I ran into while making a code generator. I didn't end up depending on this codepath, but thought it might still be useful to you or other users of the library. Unfortunately, I cannot remember how to repro the issue I was seeing.
Yeah, this part can be a bit messy to get right, and the halo effect could be annoying so I will keep this PR around for now until someone found a similar issue and provides a repro so that it can be investigated properly.
I also hit this issue when parsing template type parameters defined in the STL. Here is a simple example that hits this issue:
#include <ratio>
template <typename T>
struct foo
{
T bar;
};
foo<std::ratio<0, 1>> test;
and here is the exception stack trace:
Unhandled exception. System.NotImplementedException: Can not be here, not support type here!
at CppAst.CppElement.get_FullParentName()
at CppAst.CppClass.get_FullName()
at CppAst.CppTemplateArgument.get_ArgString()
at CppAst.CppTemplateArgument.ToString()
at CppAst.CppClass.ToString()
at System.IO.TextWriter.WriteLine(Object value)
at System.IO.TextWriter.SyncTextWriter.WriteLine(Object value)
at System.Console.WriteLine(Object value)
at Program.<Main>$(String[] args) in Program.cs:line 48
Closing this issue, as I believe that it might have been fixed in the past months, but couldn't check (though I hit a similar issue). Haven't verified with the template case above but hopefully it's solved. 🤞