-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
json_fwd.hpp no longer standalone #3656
Comments
Just to understand your use-case better: do you have parts of your code that use |
As far as I can tell (see #700), it was never the goal of this file to make it a "standalone" file but just to make it a smaller header that handles the forward declaration of the class, for files that just want to be able to pass the objects around, but not to operate on them. I assume that you are copying @falbrechtskirchinger Thoughts? |
I'm not sure where I read it, but I was under the impression that |
Yes, my workflow is to download the package .tar.gz file, and copy the json_fwd.hpp and single_include/json.hpp files into my source tree. Now that becomes more difficult with this extra dependency. And yes, I have places that only include json_fwd.hpp in their .h headers in order to reduce dependencies and compile time, when parsing the full json.hpp is not needed, but then later down in the source tree include the full json.hpp in the .cpp source. So perhaps one way to reframe the original description would be something more like a request for an amalgamated single_include/json_fwd.hpp. This can be in addition to the newly update json_fwd.hpp that has the extra include. |
Description
json_fwd.hpp now has a line:
#include <nlohmann/detail/abi_macros.hpp>
which means this file is no longer standalone. This makes it no longer possible to have a simple 2-file installation, with just json_fwd.hpp and the large single json.hpp.
This seems to be related to #3590
Reproduction steps
json_fwd.hpp now has a new external file dependency.
Expected vs. actual results
Expected:
Be able to have json_fwd.hpp standalone with no dependencies.
Actual:
json_fwd.hpp has an include file, so it can't be used by itself anymore.
Minimal code example
any code that wants to only do: #include "json_fwd.hpp"
Error messages
Compiler and operating system
any
Library version
3.11.1
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: