Skip to content

Forward declare-only header? #427

Closed
Closed

Description

@mcourteaux

Would it be possible to provide a header meant for forward declaring only? This would save roughly 10k lines of code for all the compilation units that do not really need the details of json but just a pointer/reference or the size of the nlohmann::json class.

Then we could do in header files:

#include <json_fd.hpp>

nlohmann::json *json_ptr;

This would allow me to speed up compilation of my project quite a bit, as I use your json project here and there, but turns out to be included in a large portion of the compilation units.

Activity

  1. mcourteaux commented on Jan 13, 2017

    @mcourteaux
    Author

    Oh gosh. There is an issue for this. #381

  2. added
    solution: duplicate
    on Jan 13, 2017
  3. nlohmann commented on Jan 13, 2017

    @nlohmann
    Owner

    No problem! If you have any further idea, just add comments.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: enhancement/improvementsolution: duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions