aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-06 01:37:13 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-06 01:37:13 +0000
commit4aa4eb9234c05fac50799659bc37a600335755ef (patch)
tree3d983ea6422c67f35c4d016447029f683351e09d
parent9e10bca73be4f3296d318f80c7aee7368638e37f (diff)
downloadpaludis-4aa4eb9234c05fac50799659bc37a600335755ef.tar.gz
paludis-4aa4eb9234c05fac50799659bc37a600335755ef.tar.xz
Fix LabelsDepSpec::clone.
-rw-r--r--paludis/dep_spec.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index bc370ca..e656cd2 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -359,7 +359,10 @@ template <typename T_>
tr1::shared_ptr<DepSpec>
LabelsDepSpec<T_>::clone() const
{
- return tr1::shared_ptr<LabelsDepSpec<T_> >(new LabelsDepSpec<T_>);
+ using namespace tr1::placeholders;
+ tr1::shared_ptr<LabelsDepSpec<T_> > my_clone(new LabelsDepSpec<T_>);
+ std::for_each(begin(), end(), tr1::bind(&LabelsDepSpec<T_>::add_label, my_clone, _1));
+ return my_clone;
}
template <typename T_>