diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-04-03 12:31:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-18 16:52:08 -0400 |
commit | e829828dcd9b989a9efb32f7c69cd8652e9857ec (patch) | |
tree | f0ae286f142b7c6575a8dc21c3c564efe13b794f /indra/llcommon/CMakeLists.txt | |
parent | e6d0138a6a1ce6dd285fbfedbcf8532bc6aaa29b (diff) |
Introduce fsyspath subclass of std::filesystem::path.
Our std::strings are UTF-8 encoded, so conversion from std::string to
std::filesystem::path must use UTF-8 decoding. The native Windows
std::filesystem::path constructor and assignment operator accepting
std::string use "native narrow encoding," which mangles path strings
containing UTF-8 encoded non-ASCII characters.
fsyspath's std::string constructor and assignment operator explicitly engage
std::filesystem::u8path() to handle encoding. u8path() is deprecated in C++20,
but once we adapt fsyspath's conversion to C++20 conventions, consuming code
need not be modified.
(cherry picked from commit e399b02e3306a249cb161f07cac578d3f2617bab)
Diffstat (limited to 'indra/llcommon/CMakeLists.txt')
-rw-r--r-- | indra/llcommon/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 60549d9d11..a504e71340 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -119,6 +119,7 @@ set(llcommon_HEADER_FILES commoncontrol.h ctype_workaround.h fix_macros.h + fsyspath.h function_types.h indra_constants.h lazyeventapi.h |