-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
error: ‘BasicJsonType’ in namespace ‘::’ does not name a type #1051
Comments
Could you indicate the line where the error occurs or paste the complete error message here? What was the code you tried to compile? |
/home/ec2-user/dev/john/Flow360_3.26.2018/json/include/nlohmann/detail/iterators/iter_impl.hpp:46:11: error: ‘BasicJsonType’ in namespace ‘::’ does not name a type I reverted to version 2.1.2 and got it to compile, but I would like to use the latest version. |
Seems like a compiler bug to me... Could you try patching the using J = BasicJsonType;
friend J; |
hmm. Same thing with the patch: |
This is weird, I guess it's the same problem if you change the name of the template parameter directly? |
I think it's a bug with nvcc. If I move the function to a separate cpp file and compile it only with gcc, it works. |
Thanks for reporting back! |
is there anyway to make it work with nvcc? |
This answer in Stackoverflow solves the problem. Adding a wrapper around the BasicJsonType works with nvcc and gcc.
|
I get this error when compiling with nvcc, which is using g++6.4.1. I am specifying the --std=c++11 flag.
The version of nlohmann/json is 3.1.2.
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: