Skip to content

Illegal indirection #467

Closed
Closed

Description

@brunohkbx

I'm trying to use it in VS2015 but when I try to compile I got this error.

C2100 Illegal indirection

Activity

  1. nlohmann commented on Feb 22, 2017

    @nlohmann
    Owner

    This is strange, because the project compiles with AppVeyor without problems:

    What is the exact error message? What compilation flags are you using?

  2. brunohkbx commented on Feb 23, 2017

    @brunohkbx
    Author

    I just updated my VS2015 and its working fine.
    Thanks!

  3. glennra commented on Mar 24, 2017

    @glennra

    I have this issue too. Using 2.1.1.

    Microsoft Visual Studio Community 2015
    Version 14.0.24720.00 Update 1

    All I have done is added #include "json.hpp" to my source file.

    c:\path\to\json.hpp(887): error C2100: illegal indirection
    c:\path\to\json.hpp(898): note: see reference to class template instantiation 'nlohmann::detail::static_constnlohmann::detail::to_json_fn' being compiled

    Compilation flags generated by CMake:
    /Yu"StdAfx.h" /GS /TP /W3 /Zc:wchar_t /I"C:\Boost\include\boost-1_60" /Zi /Gm- /Od /Ob0 /Fd"MyLib.dir\Debug\MyLib.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "BOOST_LOG_DYN_LINK" /D "BOOST_USE_WINAPI_VERSION=0x0601" /D "CMAKE_INTDIR="Debug"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /MDd /Fa"Debug/" /EHsc /nologo /Fo"MyLib.dir\Debug" /Fp"MyLib.dir\Debug\MyLib.pch"

  4. nlohmann commented on Mar 24, 2017

    @nlohmann
    Owner

    @glennra The tests at AppVeyor work with MSVC 14.0.25420.1 (see https://ci.appveyor.com/project/nlohmann/json for detailed output). I'm not sure about the differences to the version you are using, but @brunohkbx seems to have fixed the issue by updating.

  5. glennra commented on Mar 26, 2017

    @glennra

    Thanks. It works with:
    Microsoft Visual Studio Community 2015
    Version 14.0.25431.01 Update 3

    VS usually automatically offers updates but in this case it had not done that so I had to manually download and run the updater.

  6. Hafnernuss commented on Aug 16, 2017

    @Hafnernuss

    I can confirm this, by updating from Update 1 to Update 3 everything works fine.

  7. nlohmann commented on Aug 16, 2017

    @nlohmann
    Owner

    Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions