Skip to content

Commit c74fb29

Browse files
author
Marcin Sobieszczanski
committed
include C++ extensions based on _MSVC_LANG
1 parent 65b82cf commit c74fb29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hdr/sqlite_modern_cpp/type_wrapper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
#include <memory>
66
#include <vector>
77
#ifdef __has_include
8-
#if __cplusplus >= 201703 && __has_include(<string_view>)
8+
#if (__cplusplus >= 201703 || _MSVC_LANG >= 201703) && __has_include(<string_view>)
99
#define MODERN_SQLITE_STRINGVIEW_SUPPORT
1010
#endif
1111
#endif
1212
#ifdef __has_include
13-
#if __cplusplus > 201402 && __has_include(<optional>)
13+
#if (__cplusplus > 201402 || _MSCV_LANG > 201402) && __has_include(<optional>)
1414
#define MODERN_SQLITE_STD_OPTIONAL_SUPPORT
1515
#elif __has_include(<experimental/optional>) && __apple_build_version__ < 11000000
1616
#define MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT
1717
#endif
1818
#endif
1919

2020
#ifdef __has_include
21-
#if __cplusplus > 201402 && __has_include(<variant>)
21+
#if (__cplusplus > 201402 || _MSVC_LANG > 201402) && __has_include(<variant>)
2222
#define MODERN_SQLITE_STD_VARIANT_SUPPORT
2323
#endif
2424
#endif

0 commit comments

Comments
 (0)