Skip to content

Forward declare-only header? #427

@mcourteaux

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions