From 317cf0feafe8e80e3efce10e7c903de6d8a60a11 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 18 Nov 2021 09:29:46 -0500 Subject: [PATCH] Update pybind11.h --- include/pybind11/pybind11.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index c603a4b24..5d861546f 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -10,6 +10,11 @@ #pragma once +// Bug in MSVC 2022 requiring this file first +#if defined(_MSC_VER) && (_MSC_VER >= 1930) +#include +#endif + #include "attr.h" #include "gil.h" #include "options.h" @@ -33,10 +38,6 @@ # define PYBIND11_HAS_STD_LAUNDER 0 #endif -#if defined(_MSC_VER) && (_MSC_VER >= 1930) -#include -#endif - #if defined(__GNUG__) && !defined(__clang__) # include #endif