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

Optional way to use ghc::filesystem with forwarding header and one time included implementation #10

Closed
gulrak opened this issue Mar 23, 2019 · 3 comments
Assignees
Labels
available on master Fix is done on master branch, issue closed on next release enhancement New feature or request
Milestone

Comments

@gulrak
Copy link
Owner

gulrak commented Mar 23, 2019

Is your feature request related to a problem? Please describe.

When ghc::filesystem is used in multiple places of a project, there is a compiletime overhead due to the header-only, everything-inline nature of the library. In such situations it might be nice to be able to concentrate the implementation into a single place and include only the nessesery elements in all the other places.

This also comes with the advantage, that the needed system includes (e.g. windows.h) will only be needed at the implementation place, so thes do not pollute the global namespace in every place filesystem is used.

Describe the solution you'd like

Two small wrapping headers should be added, they set some defines and include the normal filesystem.hpp header. One called fs_fwd.hpp will ensure everything needed to use ghc::filesystem is visible, the other, called fs_impl.hpp will lead to the expansion of all implementation code and use the system headers needed to implement the functionality.
The implementation header must be included in a cpp before the visibility of a fs_fwd.hpp to take precedence in the code extraction.

First implementation will be done on a feature branch.

This feature is related to some wishes from #3.

@gulrak gulrak added the enhancement New feature or request label Mar 23, 2019
@gulrak gulrak self-assigned this Mar 23, 2019
@gulrak
Copy link
Owner Author

gulrak commented Mar 24, 2019

First wip version on branch feature-010-fwd-impl.

@gulrak gulrak added this to the v1.1.0 milestone Mar 24, 2019
@gulrak
Copy link
Owner Author

gulrak commented Mar 24, 2019

Changes tested on macOS, Windows and Linux are now on master, still as a work-in-progress, but feedback is welcome.

@gulrak gulrak added the available on master Fix is done on master branch, issue closed on next release label Apr 27, 2019
@gulrak
Copy link
Owner Author

gulrak commented Apr 27, 2019

Released with Release v1.1.0

@gulrak gulrak closed this as completed Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available on master Fix is done on master branch, issue closed on next release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant