aboutsummaryrefslogtreecommitdiff
path: root/paludis/package_id.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-11-27 22:10:48 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-11-28 00:54:36 +0000
commit1945bc4f10d16e53392a945fd39f87e435256a45 (patch)
tree25fdaa07a2b30b0a3387ba9f9938b30785c54083 /paludis/package_id.cc
parent2adc701cea7587b027bffd94ac6fb069e7722342 (diff)
downloadpaludis-1945bc4f10d16e53392a945fd39f87e435256a45.tar.gz
paludis-1945bc4f10d16e53392a945fd39f87e435256a45.tar.xz
Don't use virtuals for wrapped forward iterators
Diffstat (limited to 'paludis/package_id.cc')
-rw-r--r--paludis/package_id.cc47
1 files changed, 29 insertions, 18 deletions
diff --git a/paludis/package_id.cc b/paludis/package_id.cc
index 9ebf69663..1d5e5edd6 100644
--- a/paludis/package_id.cc
+++ b/paludis/package_id.cc
@@ -42,24 +42,6 @@ using namespace paludis;
#include <paludis/package_id-se.cc>
-template class Sequence<std::tr1::shared_ptr<const PackageID> >;
-template class WrappedForwardIterator<Sequence<std::tr1::shared_ptr<const PackageID> >::ConstIteratorTag,
- const std::tr1::shared_ptr<const PackageID> >;
-template class WrappedForwardIterator<Sequence<std::tr1::shared_ptr<const PackageID> >::ReverseConstIteratorTag,
- const std::tr1::shared_ptr<const PackageID> >;
-template class WrappedOutputIterator<Sequence<std::tr1::shared_ptr<const PackageID> >::InserterTag,
- std::tr1::shared_ptr<const PackageID> >;
-
-template class Set<std::tr1::shared_ptr<const PackageID>, PackageIDSetComparator>;
-template class WrappedForwardIterator<Set<std::tr1::shared_ptr<const PackageID>, PackageIDSetComparator>::ConstIteratorTag,
- const std::tr1::shared_ptr<const PackageID> >;
-template class WrappedOutputIterator<Set<std::tr1::shared_ptr<const PackageID>, PackageIDSetComparator>::InserterTag,
- std::tr1::shared_ptr<const PackageID> >;
-
-template class WrappedForwardIterator<PackageID::MetadataConstIteratorTag, const std::tr1::shared_ptr<const MetadataKey> >;
-template class WrappedForwardIterator<PackageID::MasksConstIteratorTag, const std::tr1::shared_ptr<const Mask> >;
-template class WrappedForwardIterator<PackageID::OverriddenMasksConstIteratorTag, const std::tr1::shared_ptr<const OverriddenMask> >;
-
namespace paludis
{
template <>
@@ -68,6 +50,18 @@ namespace paludis
mutable std::list<std::tr1::shared_ptr<const Mask> > masks;
mutable std::list<std::tr1::shared_ptr<const OverriddenMask> > overridden_masks;
};
+
+ template <>
+ struct WrappedForwardIteratorTraits<PackageID::MasksConstIteratorTag>
+ {
+ typedef std::list<std::tr1::shared_ptr<const Mask> >::const_iterator UnderlyingIterator;
+ };
+
+ template <>
+ struct WrappedForwardIteratorTraits<PackageID::OverriddenMasksConstIteratorTag>
+ {
+ typedef std::list<std::tr1::shared_ptr<const OverriddenMask> >::const_iterator UnderlyingIterator;
+ };
}
PackageID::PackageID() :
@@ -249,3 +243,20 @@ PackageID::can_drop_in_memory_cache() const
{
}
+template class Sequence<std::tr1::shared_ptr<const PackageID> >;
+template class WrappedForwardIterator<Sequence<std::tr1::shared_ptr<const PackageID> >::ConstIteratorTag,
+ const std::tr1::shared_ptr<const PackageID> >;
+template class WrappedForwardIterator<Sequence<std::tr1::shared_ptr<const PackageID> >::ReverseConstIteratorTag,
+ const std::tr1::shared_ptr<const PackageID> >;
+template class WrappedOutputIterator<Sequence<std::tr1::shared_ptr<const PackageID> >::InserterTag,
+ std::tr1::shared_ptr<const PackageID> >;
+
+template class Set<std::tr1::shared_ptr<const PackageID>, PackageIDSetComparator>;
+template class WrappedForwardIterator<Set<std::tr1::shared_ptr<const PackageID>, PackageIDSetComparator>::ConstIteratorTag,
+ const std::tr1::shared_ptr<const PackageID> >;
+template class WrappedOutputIterator<Set<std::tr1::shared_ptr<const PackageID>, PackageIDSetComparator>::InserterTag,
+ std::tr1::shared_ptr<const PackageID> >;
+
+template class WrappedForwardIterator<PackageID::MasksConstIteratorTag, const std::tr1::shared_ptr<const Mask> >;
+template class WrappedForwardIterator<PackageID::OverriddenMasksConstIteratorTag, const std::tr1::shared_ptr<const OverriddenMask> >;
+