From 6ca312b3bcdccdd55321dcf7111a50cad37a6c99 Mon Sep 17 00:00:00 2001 From: Samuel Debionne Date: Thu, 19 Sep 2019 21:23:03 +0200 Subject: [PATCH] Avoid infinite recursion in is_copy_constructible (#1910) --- include/pybind11/cast.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 67397c4ee..605acb366 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -775,7 +775,9 @@ template struct is_copy_constructible : std // so, copy constructability depends on whether the value_type is copy constructible. template struct is_copy_constructible, - std::is_same + std::is_same, + // Avoid infinite recursion + negation> >::value>> : is_copy_constructible {}; #if !defined(PYBIND11_CPP17)