Only enable std::optional if compiling in >= C++14 (#476)

This commit is contained in:
Jason Rhinelander 2016-11-03 11:17:11 -04:00 committed by Wenzel Jakob
parent 44a69f78cf
commit 12edaaa66a
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@
#pragma warning(disable: 4127) // warning C4127: Conditional expression is constant
#endif
#ifdef __has_include
#if defined(PYBIND11_CPP14) && defined(__has_include)
// std::optional
# if __has_include(<optional>)
# include <optional>