Skip to content

Commit 29faf27

Browse files
committed
Don't use C++20 path APIs unless we're building for C++20.
Fixes MSVC 2019 compatibility in C++17 mode.
1 parent 68d50e0 commit 29faf27

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

include/st_config.h.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@
3434
#cmakedefine ST_HAVE_EXPERIMENTAL_STRING_VIEW
3535
#cmakedefine ST_HAVE_CXX17_FILESYSTEM
3636
#cmakedefine ST_HAVE_EXPERIMENTAL_FILESYSTEM
37+
#if (__cplusplus > 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201703L))
3738
#cmakedefine ST_HAVE_CXX20_U8_FSPATH
3839
#endif
39-
#cmakedefine ST_ENABLE_STL_STRINGS
40-
#cmakedefine ST_ENABLE_STL_FILESYSTEM
40+
#endif
4141
#if (__cplusplus > 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201703L))
4242
#cmakedefine ST_HAVE_CXX20_CHAR8_TYPES
4343
#endif
4444

45+
#cmakedefine ST_ENABLE_STL_STRINGS
46+
#cmakedefine ST_ENABLE_STL_FILESYSTEM
47+
4548
// Backwards compatibility for clients of string_theory
4649
#define ST_NOEXCEPT noexcept
4750
#define ST_OVERRIDE override

0 commit comments

Comments
 (0)