Optional way to use ghc::filesystem with forwarding header and one time included implementation #10
Labels
available on master
Fix is done on master branch, issue closed on next release
enhancement
New feature or request
Milestone
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 calledfs_fwd.hpp
will ensure everything needed to useghc::filesystem
is visible, the other, calledfs_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.
The text was updated successfully, but these errors were encountered: