-
Notifications
You must be signed in to change notification settings - Fork 86
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
Why checking Type equals 0 #15
Comments
Because it should never be necessary to instantiate the base template. As the Using |
We experienced this issue when trying to use the library with MSVC 2015. Everything seems to work fine, but this assertion is triggered. We definitely can't be using the traits::assign() function though, since surely that would generate a link time error? |
If the assert triggers, it means you forgot to specialize the traits function. Look at the error message, what it That is the type you are trying to use, but there is no traits specialization for that type, hence the library doesn't know what to do with it. The If you can post the error message and a small code example/excerpt, I might be able to help further... |
The visual studio compiler is not giving us any useful information. I commented out all the code that uses your lib but only include the header. The compile output is
I don't feel the error message is accurate :( |
Ah, I see. Well, the error message is basically complaining about a missing specialization for
but that is most likely a problem in our code. As we are not Visual Studio / Windows users ourselves and the library is in an early stage of development, we haven't found the time to make it compatible with Visual Studio. I know, bad news... sorry. I am about to refactor some more stuff (probably later today), maybe it solves the problem, maybe not. Probably not. :-/ Anyways, I'm afraid there is no real solution currently. After the next refactoring, we would, of course, appreciate help from actual Visual Studio users if they can figure out ways to fix the problems VS is having and send a pull request. I'll close the question for now, general Visual Studio / Windows support will happen anyways when we have enough time and help in the future. |
Sure, thank you very much for all the help. Enjoy coding :D |
https://github.com/taocpp/json/blob/master/include/tao/json/traits.hpp#L33
In traits, line 33, there is a static assert to check if type size equals 0. Why?
The text was updated successfully, but these errors were encountered: