no message

[SVN r38076]
This commit is contained in:
Ion Gaztañaga
2007-06-23 13:09:46 +00:00
parent 7be768cf8e
commit 0653ca2678
18 changed files with 412 additions and 370 deletions
+4 -4
View File
@@ -38,8 +38,8 @@ class new_cloner
{ return new my_class(clone_this); }
};
//The destroyer object function
class delete_destroyer
//The disposer object function
class delete_disposer
{
public:
void operator()(my_class *delete_this)
@@ -61,7 +61,7 @@ int main()
//Now clone "list" using "new" and "delete" object functions
my_class_list cloned_list;
cloned_list.clone_from(list, new_cloner(), delete_destroyer());
cloned_list.clone_from(list, new_cloner(), delete_disposer());
//Test that both are equal
if(cloned_list != list){
@@ -72,7 +72,7 @@ int main()
}
//Don't forget to free the memory from the second list
cloned_list.clear_and_destroy(delete_destroyer());
cloned_list.clear_and_dispose(delete_disposer());
return 0;
}
//]