Skip to content
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

illegal indirection #548

Closed
jacobjz opened this issue Apr 5, 2017 · 22 comments
Closed

illegal indirection #548

jacobjz opened this issue Apr 5, 2017 · 22 comments
Labels

Comments

@jacobjz
Copy link

jacobjz commented Apr 5, 2017

image
so i get this error :/

@gregmarr
Copy link
Contributor

gregmarr commented Apr 5, 2017

What release/commit are you using?

@jacobjz
Copy link
Author

jacobjz commented Apr 5, 2017

version 2.1.1

@gregmarr
Copy link
Contributor

gregmarr commented Apr 5, 2017

That's very strange. This is line 1136 in that release:

       result["url"] = "https://github.com/nlohmann/json";

What is line 1136 in your json.hpp?

@nlohmann
Copy link
Owner

nlohmann commented Apr 6, 2017

Could you remove all headers but json.hpp and have your main just consist of json j;?

@nlohmann nlohmann added the platform: visual studio related to MSVC label Apr 6, 2017
@jacobjz
Copy link
Author

jacobjz commented Apr 6, 2017

I've downloader version 2.0.5 and it works. :)

@nlohmann
Copy link
Owner

nlohmann commented Apr 6, 2017

That's strange. Which version of MSVC is this?

@jacobjz
Copy link
Author

jacobjz commented Apr 6, 2017

  1. Btw can i make an object of any class with this repository? I'm trying to send an object from Java to C++.

@nlohmann
Copy link
Owner

nlohmann commented Apr 6, 2017

As of version 2.1.0, you can convert any type from/to JSON, see https://github.com/nlohmann/json#arbitrary-types-conversions.

MSVC 2015 is supported, and we use it with AppVeyor, see https://github.com/nlohmann/json#supported-compilers.

@jacobjz
Copy link
Author

jacobjz commented Apr 6, 2017

Ok, i'll post the piece of code where this error occurs tonight and chceck AppVeyor as well:)

@nlohmann
Copy link
Owner

Any news here?

@tatjam
Copy link

tatjam commented Apr 13, 2017

Hmm I'm having the same issue (latest version, got it directly from the file in the repo). Seems to be happening in this line static constexpr T value{};, line 1136.

@tatjam
Copy link

tatjam commented Apr 13, 2017

Also seems to happen on version 2.1.0, but no issues on version 2.0.10

Will try g++ with the 3 versions and see if there is any issue, reporting soon!

2.0.10 : No issues on g++. No issues on Visual Studio
2.1.0: No issues on g++. Illegal indirection on Visual Studio
2.1.1 No issues on g++. Illegal indirection on Visual Studio

I don't have Visual Studio 2017 so won't be able to test with it

@nlohmann
Copy link
Owner

Could you please tell me the exact versions of your MSVC. The library is known to work with the following versions:

  • Visual Studio 14 2015, Microsoft (R) Build Engine version 14.0.25123.0 (and probably later)
  • Visual Studio 2017, Microsoft (R) Build Engine version 15.1.548.43366 (and probably later)

These exact versions are used by AppVeyor where the test suite can be compiled and executed without errors.

@tatjam
Copy link

tatjam commented Apr 14, 2017

EDIT: Nevermind that's is not the version my bad... How can i get the version?

@nlohmann
Copy link
Owner

In Visual Studio, the Tab 'Help'-> 'About Microsoft Visual Studio' should give you the desired infos. (from http://stackoverflow.com/a/5089489/266378).

@nlohmann
Copy link
Owner

Any news on this?

@tatjam
Copy link

tatjam commented Apr 22, 2017

Version 14.0.24720.00 Update 1

Indeed that's older than what you use, I suppose they had no full support for contextpr?

@nlohmann
Copy link
Owner

Right. Sorry, but we can't do anything about that.

@cfogelklou
Copy link

I'm getting this error in MSVC2017, same line - 1136, so definitely newer than MSVC2015. Not sure if it should be closed?

@nlohmann
Copy link
Owner

Hi @cfogelklou, what is the exact version you are using?

We are using Microsoft (R) Build Engine version 15.1.548.43366 with AppVeyor, see https://ci.appveyor.com/project/nlohmann/json/build/1932 for the latest build which succeeds on MSVC 2017 as well.

@xgdgsc
Copy link

xgdgsc commented May 11, 2017

I also get this with VS2015 Version 14.0.24720.00 Update 1. I will update to see.

@nlohmann
Copy link
Owner

I think this version is not supported. The code is known to run with Microsoft Visual C++ 2015 / Build Tools 14.0.25123.0 (and possibly later), see https://github.com/nlohmann/json#supported-compilers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants