Unable to locate 'to_json()' and 'from_json()' methods in the same namespace #917
Labels
kind: question
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
I am trying out this nice library and to learn how to use it, after running the examples, I started working on a very small example on my own.
Here it is:
I compiled it twice: the first one, just with the Item class and it has been successful.
Then, I added the CategoryDescription class, where I have a vector of Item instances.
GCC 7.2.0 on Ubuntu 17.10
When I try to compile the complete version (you find here), the compilation fails with the following error:
I learned from the docs and from other issue answers that such an error tells that the to_json() and from_json() methods have not been located, isn't it?
So my question is: am I required to write a specialization of
adl_serializer
, even if both classes belongs to the same namespace?I am a bit confused, I apologize for that. It might be that I am mixing up two different problems.
But I am sure to have defined the two classes in the right order (ref. issue 561). The latter class (CategoryDescription) is making use of the former class (Item).
Thank you for your help :)
If I have missed something, feel free to ask further details.
Best Regards
The text was updated successfully, but these errors were encountered: