Index: src/SymTab/Autogen.cc
===================================================================
--- src/SymTab/Autogen.cc	(revision 31a5cabae9862067af5081d2022319391f1b7507)
+++ src/SymTab/Autogen.cc	(revision 37b7d951459a8cb66e00d62c29da49e8423128ed)
@@ -233,4 +233,15 @@
 	}
 
+	// shallow copy the pointer list for return
+	std::vector<ast::ptr<ast::TypeDecl>> getGenericParams (const ast::Type * t) {
+		if (auto structInst = dynamic_cast<const ast::StructInstType*>(t)) {
+			return structInst->base->params;
+		}
+		if (auto unionInst = dynamic_cast<const ast::UnionInstType*>(t)) {
+			return unionInst->base->params;
+		}
+		return {};
+	}
+
 	/// given type T, generate type of default ctor/dtor, i.e. function type void (*) (T *)
 	FunctionType * genDefaultType( Type * paramType, bool maybePolymorphic ) {
@@ -244,4 +255,12 @@
 		ftype->parameters.push_back( dstParam );
 		return ftype;
+	}
+
+	/// 
+	ast::FunctionDecl * genDefaultFunc(const CodeLocation loc, const std::string fname, const ast::Type * paramType, bool maybePolymorphic) {
+		std::vector<ast::ptr<ast::TypeDecl>> typeParams;
+		if (maybePolymorphic) typeParams = getGenericParams(paramType);
+		auto dstParam = new ast::ObjectDecl(loc, "_dst", new ast::ReferenceType(paramType), nullptr, {}, ast::Linkage::Cforall);
+		return new ast::FunctionDecl(loc, fname, std::move(typeParams), {dstParam}, {}, new ast::CompoundStmt(loc));
 	}
 
Index: src/SymTab/Autogen.h
===================================================================
--- src/SymTab/Autogen.h	(revision 31a5cabae9862067af5081d2022319391f1b7507)
+++ src/SymTab/Autogen.h	(revision 37b7d951459a8cb66e00d62c29da49e8423128ed)
@@ -55,4 +55,6 @@
 	/// maybePolymorphic is true if the resulting FunctionType is allowed to be polymorphic
 	FunctionType * genDefaultType( Type * paramType, bool maybePolymorphic = true );
+
+	ast::FunctionDecl * genDefaultFunc(const CodeLocation loc, const std::string fname, const ast::Type * paramType, bool maybePolymorphic = true);
 
 	/// generate the type of a copy constructor for paramType.
