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

Forward declare-only header? #427

Closed
mcourteaux opened this issue Jan 13, 2017 · 2 comments
Closed

Forward declare-only header? #427

mcourteaux opened this issue Jan 13, 2017 · 2 comments
Labels
kind: enhancement/improvement solution: duplicate the issue is a duplicate; refer to the linked issue instead

Comments

@mcourteaux
Copy link

mcourteaux commented Jan 13, 2017

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.

@mcourteaux
Copy link
Author

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

@nlohmann nlohmann added kind: enhancement/improvement solution: duplicate the issue is a duplicate; refer to the linked issue instead labels Jan 13, 2017
@nlohmann
Copy link
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
Labels
kind: enhancement/improvement solution: duplicate the issue is a duplicate; refer to the linked issue instead
Projects
None yet
Development

No branches or pull requests

2 participants