Skip to content

Commit f8b1406

Browse files
committed
Include <version> in detail/common.h (~stolen~ borrowed from @bstaletic's pybind#2816)
1 parent 651fd41 commit f8b1406

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/pybind11/detail/common.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@
162162
#include <memory>
163163
#include <typeindex>
164164
#include <type_traits>
165+
#if defined(__has_include)
166+
# if __has_include(<version>)
167+
# include <version>
168+
# endif
169+
#endif
165170

166171
#if PY_MAJOR_VERSION >= 3 /// Compatibility macros for various Python versions
167172
#define PYBIND11_INSTANCE_METHOD_NEW(ptr, class_) PyInstanceMethod_New(ptr)

0 commit comments

Comments
 (0)