pxd hack: always add copy constructor by default

release/4.3a0
Duy-Nguyen Ta 2016-09-12 18:47:04 -04:00
parent 3115f9b671
commit 450a652bcf
1 changed files with 3 additions and 5 deletions

View File

@ -131,11 +131,9 @@ bool Constructor::hasDefaultConstructor() const {
/* ************************************************************************* */
void Constructor::emit_cython_pxd(FileWriter& pxdFile, Str className) const {
// if it can ever be constructed, add the default copy constructor by default
if (nrOverloads() > 0) {
pxdFile.oss << "\t\t" << className << "(const " << className
<< "&) except +\n";
}
// HACK HACK: always add the default copy constructor by default
pxdFile.oss << "\t\t" << className << "(const " << className
<< "&) except +\n";
for (size_t i = 0; i < nrOverloads(); i++) {
ArgumentList args = argumentList(i);