Revert "Disable checks for existence of copy-constructor"

This reverts commit 4806e4f322.
I do not like this.  Needs to be investigated further.
This commit is contained in:
Gustavo Carneiro committed 2015-10-11 15:10:57 +01:00
1 parent 4806e4f322
commit 32778273ea
1 file changed
+4 -4
+4 -4
View File
@@ -3160,8 +3160,8 @@ class CppClassRefParameter(CppClassParameterBase):
wrapper.before_call.write_code("%s->flags = PYBINDGEN_WRAPPER_FLAG_NONE;" % (self.py_name,))
if self.direction == Parameter.DIRECTION_IN:
# if not self.cpp_class.has_copy_constructor:
# raise CodeGenerationError("Class {0} cannot be copied".format(self.cpp_class.full_name))
if not self.cpp_class.has_copy_constructor:
raise CodeGenerationError("Class {0} cannot be copied".format(self.cpp_class.full_name))
self.cpp_class.write_create_instance(wrapper.before_call,
"%s->obj" % self.py_name,
self.value)
@@ -3527,8 +3527,8 @@ class CppClassPtrParameter(CppClassParameterBase):
## the object after the call.
if self.direction == Parameter.DIRECTION_IN:
# if not self.cpp_class.has_copy_constructor:
# raise CodeGenerationError("Class {0} cannot be copied".format(self.cpp_class.full_name))
if not self.cpp_class.has_copy_constructor:
raise CodeGenerationError("Class {0} cannot be copied".format(self.cpp_class.full_name))
self.cpp_class.write_create_instance(wrapper.before_call,
"%s->obj" % self.py_name,
'*'+self.value)