-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
binding of reference to type GenericValue to a value of type const GenericValue drops qualifiers #721
Comments
Does it fail during compiling unit test suite, or in your own code? If it is the latter, can you show some user code? |
Hello, Sorry for this long delay, but I was in launch of a software and last minutes fixes in the meantime and... Well, you know... It's during build of my own app. Here is the end of the build log, from the point it raises the first error: And here is are the concerned lines: Around ImportThread.cpp:23: Around ImportThread.cpp:253: |
It may be:
As |
OK, so I looked and here are the natures of the variables (here gathered but not in the same place in code). About point #1: variants does'nt seem to be a const ref. About point #2: variants is a local variable in a private method whose the prototype is: However, you should be right since it goes further (it doesn't compile in full yet since I'm in porting from MSW and I have some others dependencies to resolve before) if I bypass this BuildProduct function (replacing its content with a simple 'return "";'). Well, I'll digg in this function and will tell you (it may help someone else) when I'll know what was the culprit... |
Solved! Replacing RemoveMember by EraseMember suppressed the clang error. |
Hello,
While it compiles perfectly under Windows against GCC 4.7, building a cross-platform app under OS X 10.8 against Apple LLVM clang 4.2 (based on LLVM 3.2svn), I'm stopped with this error:
||=== Build: LLVM Clang x86_64 Debug ===| ../third-party/rapidjson/include/rapidjson/document.h|71|error: binding of reference to type 'GenericValue<[2 * ...]>' to a value of type 'const GenericValue<[2 * ...]>' drops qualifiers| ../third-party/rapidjson/include/rapidjson/document.h:1365:13: note||in instantiation of member function 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::RemoveMember' requested here| ../third-party/rapidjson/include/rapidjson/document.h:1354:16: note||in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::RemoveMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' requested here| /Users/eanon/Dev/.../trunk/src/base/importer/ImportThread.cpp:242:17: note||in instantiation of member function 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::RemoveMember' requested here| ../third-party/rapidjson/include/rapidjson/document.h|755|note: passing argument to parameter 'rhs' here| ../third-party/rapidjson/include/rapidjson/document.h|1388|note: implicit default copy assignment operator for 'rapidjson::GenericMember<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' first required here| ||=== Build finished: 1 error(s), 3 warning(s) (0 minute(s), 5 second(s)) ===|
So, I understand that a non-constant reference to a constant value is a matter of trouble, but I don't know how to get rid of this error in the present case.
How to solve it?
Anyway, congratulations for rapidjson.
The text was updated successfully, but these errors were encountered: