-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
No matching member function for call to 'get_impl' #308
Comments
I just noticed that having both constructors available makes the code compile, i.e. having
compiles, but having just
does not. I have no clue why though. |
Thanks for reporting. It's hard to tell from the distance, but it seems as if the compiler is confused, because Could you post the complete error so I may get a clue which types were tried to use? |
Below is what I get from Xcode (non-related stuff removed). It seems it is an implicit conversion from I also made some changes to my code yesterday and now it compiles fine with only the constructor I want. I cannot see that I did any changes that should affect the json library, but I did change from passing naked pointers of Maybe these hints can point you in the right direction? If there is an issue at all - this might have been me not understanding how to use the library properly. Anyway, the issue seems to be gone on my part now. Thanks for getting back so quick. Output from Xcode compiler:
|
Thanks for the quick response. Unfortunately, I also cannot figure out the error. As you seem to have fixed it by yourself (though not knowing how ;-)), I think we can close this issue. If you need any support, feel free to ask! |
(Marked as invalid, because there was no bug in the library) |
I have recently started to use this Json library for my C++ code which will be used as a container for shopping list data on an Android and iOS app. The only thing I use it for (at least so far) is to return an std::string with Json data through objective C++ (iOS) or JNI (Android) for data saving/serialization. This works fine. I am now working to deserialize the Json string to set up the shopping list from saved data. Everything works fine here as well, except this constructor which won't compile:
IngredientCPP(const json& j, int fileFormatVersion);
The error I get when trying to compile the first constructor is
/mypath/shoppinglist/externals/json/json.hpp:2899:16: No matching member function for call to 'get_impl'
The function in question is
I used to have the the above constructor just as
IngredientCPP(const json& j);
which compiles fine, but I need to support multiple format versions in case the saving of the shopping list change in the future (which I know it will). Thus I need to add the integer for versioning. I have trouble seeing what I am doing wrong since I pass
const json& j
to other constructors where they work just fine, for example this:ShopGroupSectionManager(const std::vector<ShopGroupCPP>& shopGroups, bool sumIngredients, const json& j)
Any hints that can point me in the right direction? My
json.hpp
file is downloaded at september 4th, just a week ago. Let me know if additional information is needed.The text was updated successfully, but these errors were encountered: