diff options
author | Li Jin <dragon-fly@qq.com> | 2021-04-21 09:36:25 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-04-21 09:36:25 +0800 |
commit | b7bdf7d5d36825a1a750a74641f6d374dec5d67a (patch) | |
tree | 6b27eb6590e07c07f378305c51d0f5e0779faa83 /src/3rdParty/ghc/fs_std.hpp | |
parent | b86e5af605a170a3559df0165eac3cb6b665dc49 (diff) | |
download | yuescript-b7bdf7d5d36825a1a750a74641f6d374dec5d67a.tar.gz yuescript-b7bdf7d5d36825a1a750a74641f6d374dec5d67a.tar.bz2 yuescript-b7bdf7d5d36825a1a750a74641f6d374dec5d67a.zip |
adjust some folder levels.
Diffstat (limited to 'src/3rdParty/ghc/fs_std.hpp')
-rw-r--r-- | src/3rdParty/ghc/fs_std.hpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/3rdParty/ghc/fs_std.hpp b/src/3rdParty/ghc/fs_std.hpp new file mode 100644 index 0000000..d8e03b8 --- /dev/null +++ b/src/3rdParty/ghc/fs_std.hpp | |||
@@ -0,0 +1,56 @@ | |||
1 | //--------------------------------------------------------------------------------------- | ||
2 | // | ||
3 | // ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14 | ||
4 | // | ||
5 | //--------------------------------------------------------------------------------------- | ||
6 | // | ||
7 | // Copyright (c) 2018, Steffen Schümann <s.schuemann@pobox.com> | ||
8 | // | ||
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy | ||
10 | // of this software and associated documentation files (the "Software"), to deal | ||
11 | // in the Software without restriction, including without limitation the rights | ||
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
13 | // copies of the Software, and to permit persons to whom the Software is | ||
14 | // furnished to do so, subject to the following conditions: | ||
15 | // | ||
16 | // The above copyright notice and this permission notice shall be included in all | ||
17 | // copies or substantial portions of the Software. | ||
18 | // | ||
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
25 | // SOFTWARE. | ||
26 | // | ||
27 | //--------------------------------------------------------------------------------------- | ||
28 | // fs_std.hpp - The dynamic switching header that includes std::filesystem if detected | ||
29 | // or ghc::filesystem if not, and makes the resulting API available in the | ||
30 | // namespace fs. | ||
31 | //--------------------------------------------------------------------------------------- | ||
32 | #ifndef GHC_FILESYSTEM_STD_H | ||
33 | #if defined(__cplusplus) && __cplusplus >= 201703L && defined(__has_include) && (!defined(__GNUC__) || __GNUC__ >= 9) | ||
34 | #if __has_include(<filesystem>) | ||
35 | #define GHC_USE_STD_FS | ||
36 | #include <filesystem> | ||
37 | namespace fs { | ||
38 | using namespace std::filesystem; | ||
39 | using ifstream = std::ifstream; | ||
40 | using ofstream = std::ofstream; | ||
41 | using fstream = std::fstream; | ||
42 | } | ||
43 | #endif | ||
44 | #endif | ||
45 | #ifndef GHC_USE_STD_FS | ||
46 | #define GHC_WIN_WSTRING_STRING_TYPE | ||
47 | #include "ghc/filesystem.hpp" | ||
48 | namespace fs { | ||
49 | using namespace ghc::filesystem; | ||
50 | using ifstream = ghc::filesystem::ifstream; | ||
51 | using ofstream = ghc::filesystem::ofstream; | ||
52 | using fstream = ghc::filesystem::fstream; | ||
53 | } | ||
54 | #endif | ||
55 | #endif // GHC_FILESYSTEM_STD_H | ||
56 | |||