We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9f5a46 commit 6ca312bCopy full SHA for 6ca312b
include/pybind11/cast.h
@@ -775,7 +775,9 @@ template <typename T, typename SFINAE = void> struct is_copy_constructible : std
775
// so, copy constructability depends on whether the value_type is copy constructible.
776
template <typename Container> struct is_copy_constructible<Container, enable_if_t<all_of<
777
std::is_copy_constructible<Container>,
778
- std::is_same<typename Container::value_type &, typename Container::reference>
+ std::is_same<typename Container::value_type &, typename Container::reference>,
779
+ // Avoid infinite recursion
780
+ negation<std::is_same<Container, typename Container::value_type>>
781
>::value>> : is_copy_constructible<typename Container::value_type> {};
782
783
#if !defined(PYBIND11_CPP17)
0 commit comments