Skip to content

Commit

Permalink
Don't use C++20 path APIs unless we're building for C++20.
Browse files Browse the repository at this point in the history
Fixes MSVC 2019 compatibility in C++17 mode.
  • Loading branch information
zrax committed May 5, 2020
1 parent 68d50e0 commit 29faf27
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/st_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@
#cmakedefine ST_HAVE_EXPERIMENTAL_STRING_VIEW
#cmakedefine ST_HAVE_CXX17_FILESYSTEM
#cmakedefine ST_HAVE_EXPERIMENTAL_FILESYSTEM
#if (__cplusplus > 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201703L))
#cmakedefine ST_HAVE_CXX20_U8_FSPATH
#endif
#cmakedefine ST_ENABLE_STL_STRINGS
#cmakedefine ST_ENABLE_STL_FILESYSTEM
#endif
#if (__cplusplus > 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201703L))
#cmakedefine ST_HAVE_CXX20_CHAR8_TYPES
#endif

#cmakedefine ST_ENABLE_STL_STRINGS
#cmakedefine ST_ENABLE_STL_FILESYSTEM

// Backwards compatibility for clients of string_theory
#define ST_NOEXCEPT noexcept
#define ST_OVERRIDE override
Expand Down

0 comments on commit 29faf27

Please sign in to comment.