File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -775,7 +775,9 @@ template <typename T, typename SFINAE = void> struct is_copy_constructible : std
775
775
// so, copy constructability depends on whether the value_type is copy constructible.
776
776
template <typename Container> struct is_copy_constructible <Container, enable_if_t <all_of<
777
777
std::is_copy_constructible<Container>,
778
- std::is_same<typename Container::value_type &, typename Container::reference>
778
+ std::is_same<typename Container::value_type &, typename Container::reference>,
779
+ // Avoid infinite recursion
780
+ negation<std::is_same<Container, typename Container::value_type>>
779
781
>::value>> : is_copy_constructible<typename Container::value_type> {};
780
782
781
783
#if !defined(PYBIND11_CPP17)
You can’t perform that action at this time.
0 commit comments