From 7b50cbd870312bdac0fe5b588f207798b5bab2dd Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Sun, 8 May 2016 20:41:39 -0400 Subject: [PATCH] Fixing VC build, apparently MSVC implementation of std::is_default_constructible had no bool() operator --- include/pybind11/stl_binders.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/pybind11/stl_binders.h b/include/pybind11/stl_binders.h index 7b0047d99..e5ec700e6 100644 --- a/include/pybind11/stl_binders.h +++ b/include/pybind11/stl_binders.h @@ -69,7 +69,7 @@ class vector_binder { // template{} >::type * = nullptr> // void maybe_constructible(Class_ &cl) {} - template{} >::type * = nullptr> + template::value >::type * = nullptr> void maybe_default_constructible() { cl.def(pybind11::init()); cl.def("resize", (void (Vector::*)(SizeType count)) &Vector::resize, "changes the number of elements stored"); @@ -86,16 +86,16 @@ class vector_binder { return seq; }); } - template{} >::type * = nullptr> + template::value >::type * = nullptr> void maybe_default_constructible() {} - template{} >::type * = nullptr> + template::value >::type * = nullptr> void maybe_copy_constructible() { cl.def(pybind11::init< Vector const &>()); } - template{} >::type * = nullptr> - void vector_bind_maybe_copy_constructible(Class_ &) {} + template::value >::type * = nullptr> + void maybe_copy_constructible() {} template(0) >::type * = nullptr>