Skip to content

Commit fc822e3

Browse files
mgxnzhukenneth-jia
authored andcommitted
Update Types.h
Add macros for MSVC cxx standard
1 parent 3955b12 commit fc822e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/kafka/Types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
// Use `boost::optional` for C++14, which doesn't support `std::optional`
19-
#if __cplusplus >= 201703L
19+
#if (__cplusplus >= 201703L) || (_MSVC_LANG >= 201703L)
2020
#include <optional>
2121
template<class T>
2222
using Optional = std::optional<T>;
@@ -84,7 +84,7 @@ using KeySize = std::size_t;
8484
/**
8585
* Null Key.
8686
*/
87-
#if __cplusplus >= 201703L
87+
#if (__cplusplus >= 201703L) || (_MSVC_LANG >= 201703L)
8888
const inline Key NullKey = Key{};
8989
#else
9090
const static Key NullKey = Key{};
@@ -99,7 +99,7 @@ using ValueSize = std::size_t;
9999
/**
100100
* Null Value.
101101
*/
102-
#if __cplusplus >= 201703L
102+
#if (__cplusplus >= 201703L) || (_MSVC_LANG >= 201703L)
103103
const inline Value NullValue = Value{};
104104
#else
105105
const static Value NullValue = Value{};

0 commit comments

Comments
 (0)