From 12edaaa66ac8a41c65208252f8b651e639458110 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Thu, 3 Nov 2016 11:17:11 -0400 Subject: [PATCH] Only enable std::optional if compiling in >= C++14 (#476) --- include/pybind11/stl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/stl.h b/include/pybind11/stl.h index b3fe1577..4da67df2 100644 --- a/include/pybind11/stl.h +++ b/include/pybind11/stl.h @@ -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() # include