-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error for ValueVisitor example #62
Comments
The example is from the CAMP code. I haven't used/tested it. I've created an "example inserter" for the docs, so that the examples get compiled to check they work, but clearly I haven't moved this one. CAMP used If you change |
Unfortunately, then I get a
But maybe that's a different story? |
Well it's looking for |
Unfortunately, it makes no difference. As usual with templates, the comile error is rather lengthy, the topmost part is:
Again, could that be a different story that does not anymore has to do with string? BTW, I thought I try something out with a ValueVisitor. Since a fix seems not so clear, I am currently reworking my code to use an old-fashioned switch statement. |
Well it looks like an uninitialised Value may have been passed to the visitor. |
I tried to iterate over the properties of a const ponder::Class& metaClass = obj.getClass();
for (auto&& iter : metaClass.propertyIterator())
{
const ponder::Property& property = *iter.value().get();
ponder::Value val = property.get(obj);
val.visit(visitor);
} |
It seems that (at least in my environment = VS2015) your ValueVisitor example leads to a compile error. I had problems with my own ValueVisitor, so I tried to reproduce your ValueVisitor example to see if the behaviour is the same. It looks as if that would be the case.
When I compile your ValueVisitor example (which can be found here: ValueVisitor example) I get the following compiler error:
It seems that the compiler does not know which of the operators to call if the Value is a string.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: