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 support of the more standard conforming wchar_t/wstring interface when compiling on Windows #17

Closed
gulrak opened this issue May 18, 2019 · 1 comment
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 May 18, 2019

The C++17 standard demands for std::filesystem::path: "For Windows-based operating systems, value_type is wchar_t and preferred_separator is the backslash character (L’\\’)." (30.10.8-2)

While I still don't really like the decision, I will try to help those in need of a more std::filesystem conforming implementation for C++11/14 by implementing an option to build ghc::filesystem
with ghc::filesystem::path::value_type as wchar_t and ghc::filesystem::path::string_type as std::basic_string<wchar_t> on Windows.

It might be a good idea to actually activate that option from the helper header files that try to detect std::filesystem and include ghc::filesystem only when no standard version is available, as in these situations the resulting fs::path should have the same interface.

@gulrak gulrak self-assigned this May 18, 2019
@gulrak gulrak added the enhancement New feature or request label May 18, 2019
@gulrak gulrak added this to the v1.2.0 milestone May 18, 2019
gulrak added a commit that referenced this issue May 19, 2019
gulrak added a commit that referenced this issue May 31, 2019
Squashed commit of the following:

commit f4a85d2
Author: Steffen Schümann <[email protected]>
Date:   Sun May 19 10:02:22 2019 +0200

    refs #17, refs #18, Missing use of alloc in fromUtf8 (fixed on master) and initialization order issue.

commit aa1cb70
Author: Steffen Schümann <[email protected]>
Date:   Sun May 19 09:46:02 2019 +0200

    refs #18, fighting VS2015 sfinae issues

commit 15788d8
Author: Steffen Schümann <[email protected]>
Date:   Sat May 18 10:35:25 2019 +0200

    refs #17, work on wchar_t/wstring support on Windows.
gulrak added a commit that referenced this issue Jun 2, 2019
…string on Windows when using fs_std*.hpp helper header
gulrak added a commit that referenced this issue Jun 2, 2019
@gulrak gulrak added the available on master Fix is done on master branch, issue closed on next release label Jun 2, 2019
@gulrak
Copy link
Owner Author

gulrak commented Jun 2, 2019

This is now part of release v1.2.0

Feature can be activated by defining GHC_WIN_WSTRING_STRING_TYPE or by including ghc/fs_std.hpp or ghc/fs_std_fwd.hpp/ghc/fs_std_impl.hpp

@gulrak gulrak closed this as completed Jun 2, 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